neocgit

a more 'modern' version of cgit
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/neocgit

commit 7fea585e252ee7a584e4b2d679009518bab48ebe
parent 32c27e887732298da1724c0740004925fcadae39
Author: Christian Hesse <mail@eworm.de>
Date:   Mon, 10 Oct 2016 20:17:51 +0200

ui-repolist: fix memory leak

Diffstat:
Mui-repolist.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ui-repolist.c b/ui-repolist.c @@ -343,13 +343,15 @@ void cgit_print_repolist(void) html_txt(ctx.repo->owner); cgit_close_filter(ctx.repo->owner_filter); } else { + char *currenturl = cgit_currenturl(); html("<a href='"); - html_attr(cgit_currenturl()); + html_attr(currenturl); html("?q="); html_url_arg(ctx.repo->owner); html("'>"); html_txt(ctx.repo->owner); html("</a>"); + free(currenturl); } html("</td><td>"); }