diff options
author | Christian Hesse <mail@eworm.de> | 2016-10-10 20:17:51 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2016-10-10 20:17:51 +0200 |
commit | eb68db6eff8e65105c9fd5decb7d1f45225b25ed (patch) | |
tree | 0de3782344d537381faa49f9931104e070cd6b6a | |
parent | c177379547f93955fbd251b2a70a22b9bb85a257 (diff) | |
download | cgit-eb68db6eff8e65105c9fd5decb7d1f45225b25ed.tar.gz |
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>"); } |