about summary refs log tree commit diff stats
path: root/ui-repolist.c
diff options
context:
space:
mode:
authorChristian Hesse2016-10-10 20:17:51 +0200
committerJason A. Donenfeld2016-10-12 14:13:10 +0200
commit7fea585e252ee7a584e4b2d679009518bab48ebe (patch)
treed8633d6d1f0a8d97163fc1b7f826b0f942e4f612 /ui-repolist.c
parentUse skip_prefix() to get rid of magic constants (diff)
downloadcgit-7fea585e252ee7a584e4b2d679009518bab48ebe.tar.gz
cgit-7fea585e252ee7a584e4b2d679009518bab48ebe.zip
ui-repolist: fix memory leak
Diffstat (limited to 'ui-repolist.c')
-rw-r--r--ui-repolist.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui-repolist.c b/ui-repolist.c index 1d9a7f7..7158bf7 100644 --- a/ui-repolist.c +++ b/ui-repolist.c
@@ -343,13 +343,15 @@ void cgit_print_repolist(void)
343 html_txt(ctx.repo->owner); 343 html_txt(ctx.repo->owner);
344 cgit_close_filter(ctx.repo->owner_filter); 344 cgit_close_filter(ctx.repo->owner_filter);
345 } else { 345 } else {
346 char *currenturl = cgit_currenturl();
346 html("<a href='"); 347 html("<a href='");
347 html_attr(cgit_currenturl()); 348 html_attr(currenturl);
348 html("?q="); 349 html("?q=");
349 html_url_arg(ctx.repo->owner); 350 html_url_arg(ctx.repo->owner);
350 html("'>"); 351 html("'>");
351 html_txt(ctx.repo->owner); 352 html_txt(ctx.repo->owner);
352 html("</a>"); 353 html("</a>");
354 free(currenturl);
353 } 355 }
354 html("</td><td>"); 356 html("</td><td>");
355 } 357 }