diff options
author | Christian Hesse | 2016-10-10 20:17:51 +0200 |
---|---|---|
committer | Jason A. Donenfeld | 2016-10-12 14:13:10 +0200 |
commit | 7fea585e252ee7a584e4b2d679009518bab48ebe (patch) | |
tree | d8633d6d1f0a8d97163fc1b7f826b0f942e4f612 | |
parent | 32c27e887732298da1724c0740004925fcadae39 (diff) | |
download | cgit-7fea585e252ee7a584e4b2d679009518bab48ebe.tar.gz cgit-7fea585e252ee7a584e4b2d679009518bab48ebe.tar.bz2 cgit-7fea585e252ee7a584e4b2d679009518bab48ebe.zip |
ui-repolist: fix memory leak
-rw-r--r-- | ui-repolist.c | 4 |
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 | } |