Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.zx2c4.com/cgit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2016-10-07 16:08:53 +0300
committerChristian Hesse <mail@eworm.de>2016-10-08 00:00:51 +0300
commitc177379547f93955fbd251b2a70a22b9bb85a257 (patch)
treec75367251e0e4b65915db2199db72ea7c77a1be3 /ui-repolist.c
parentd6a4730d049216f903fb0466215366f588208a40 (diff)
ui-repolist: fix memory leak
Diffstat (limited to 'ui-repolist.c')
-rw-r--r--ui-repolist.c5
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)
int i, columns = 3, hits = 0, header = 0;
char *last_section = NULL;
char *section;
+ char *repourl;
int sorted = 0;
if (!any_repos_visible()) {
@@ -330,7 +331,9 @@ void cgit_print_repolist(void)
!sorted && section ? "sublevel-repo" : "toplevel-repo");
cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL);
html("</td><td>");
- html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL);
+ repourl = cgit_repourl(ctx.repo->url);
+ html_link_open(repourl, NULL, NULL);
+ free(repourl);
html_ntxt(ctx.cfg.max_repodesc_len, ctx.repo->desc);
html_link_close();
html("</td><td>");