From c177379547f93955fbd251b2a70a22b9bb85a257 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 7 Oct 2016 15:08:53 +0200 Subject: ui-repolist: fix memory leak --- ui-repolist.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(""); - 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(""); -- cgit v1.2.3-70-g09d2