diff options
author | Christian Hesse | 2016-10-07 15:08:53 +0200 |
---|---|---|
committer | Christian Hesse | 2016-10-07 23:00:51 +0200 |
commit | c177379547f93955fbd251b2a70a22b9bb85a257 (patch) | |
tree | c75367251e0e4b65915db2199db72ea7c77a1be3 /ui-repolist.c | |
parent | d6a4730d049216f903fb0466215366f588208a40 (diff) | |
download | cgit-c177379547f93955fbd251b2a70a22b9bb85a257.tar.gz cgit-c177379547f93955fbd251b2a70a22b9bb85a257.tar.bz2 cgit-c177379547f93955fbd251b2a70a22b9bb85a257.zip |
ui-repolist: fix memory leak
Diffstat (limited to 'ui-repolist.c')
-rw-r--r-- | ui-repolist.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ui-repolist.c b/ui-repolist.c index 30915df..1d9a7f7 100644 --- a/ui-repolist.c +++ b/ui-repolist.c | |||
@@ -275,6 +275,7 @@ void cgit_print_repolist(void) | |||
275 | int i, columns = 3, hits = 0, header = 0; | 275 | int i, columns = 3, hits = 0, header = 0; |
276 | char *last_section = NULL; | 276 | char *last_section = NULL; |
277 | char *section; | 277 | char *section; |
278 | char *repourl; | ||
278 | int sorted = 0; | 279 | int sorted = 0; |
279 | 280 | ||
280 | if (!any_repos_visible()) { | 281 | if (!any_repos_visible()) { |
@@ -330,7 +331,9 @@ void cgit_print_repolist(void) | |||
330 | !sorted && section ? "sublevel-repo" : "toplevel-repo"); | 331 | !sorted && section ? "sublevel-repo" : "toplevel-repo"); |
331 | cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL); | 332 | cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL); |
332 | html("</td><td>"); | 333 | html("</td><td>"); |
333 | html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL); | 334 | repourl = cgit_repourl(ctx.repo->url); |
335 | html_link_open(repourl, NULL, NULL); | ||
336 | free(repourl); | ||
334 | html_ntxt(ctx.cfg.max_repodesc_len, ctx.repo->desc); | 337 | html_ntxt(ctx.cfg.max_repodesc_len, ctx.repo->desc); |
335 | html_link_close(); | 338 | html_link_close(); |
336 | html("</td><td>"); | 339 | html("</td><td>"); |