diff options
author | Christian Hesse <mail@eworm.de> | 2016-10-10 18:17:51 +0000 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-10-12 12:13:10 +0000 |
commit | 7fea585e252ee7a584e4b2d679009518bab48ebe (patch) | |
tree | d8633d6d1f0a8d97163fc1b7f826b0f942e4f612 | |
parent | 32c27e887732298da1724c0740004925fcadae39 (diff) | |
download | cgit-7fea585e252ee7a584e4b2d679009518bab48ebe.tar cgit-7fea585e252ee7a584e4b2d679009518bab48ebe.tar.gz 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) 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>"); } |