all repos — cgit @ c177379547f93955fbd251b2a70a22b9bb85a257

a hyperfast web frontend for git written in c

ui-repolist: fix memory leak
Christian Hesse mail@eworm.de
Fri, 07 Oct 2016 15:08:53 +0200
commit

c177379547f93955fbd251b2a70a22b9bb85a257

parent

d6a4730d049216f903fb0466215366f588208a40

1 files changed, 4 insertions(+), 1 deletions(-)

jump to
M ui-repolist.cui-repolist.c

@@ -275,6 +275,7 @@ {

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 @@ htmlf("<tr><td class='%s'>",

!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>");