ui-repolist: fix memory leak
Christian Hesse mail@eworm.de
Mon, 10 Oct 2016 20:17:51 +0200
1 files changed,
3 insertions(+),
1 deletions(-)
jump to
M
ui-repolist.c
→
ui-repolist.c
@@ -343,13 +343,15 @@ cgit_open_filter(ctx.repo->owner_filter);
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>"); }