about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2016-10-07 15:08:53 +0200
committerChristian Hesse <mail@eworm.de>2016-10-07 23:00:51 +0200
commitc177379547f93955fbd251b2a70a22b9bb85a257 (patch)
treec75367251e0e4b65915db2199db72ea7c77a1be3
parentgit: update to v2.10.1 (diff)
downloadcgit-pink-c177379547f93955fbd251b2a70a22b9bb85a257.tar.gz
cgit-pink-c177379547f93955fbd251b2a70a22b9bb85a257.zip
ui-repolist: fix memory leak
-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>");
TOURJune McEnroe 2022-07-03Add The Bone Shard EmperorJune McEnroe 2022-06-25Bump xterm font size to 12June McEnroe 2022-06-10Handle subshells (and functions) inside substitutionsJune McEnroe 2022-06-10Switch to jorts Install scriptJune McEnroe 2022-06-08Indicate if still reading or no resultsJune McEnroe 2022-06-08Add Maiden, Mother, CroneJune McEnroe 2022-06-05FIRST SHOW IN 2.5 YEARS BABEY!!!June McEnroe 2022-06-03Set line number on File linesJune McEnroe 2022-06-03Stop polling stdin after EOFJune McEnroe 2022-06-02Set TABSIZE=4June McEnroe 2022-06-02Do basic match highlightingJune McEnroe 2022-06-02Clean up parsing a littleJune McEnroe 2022-06-02Don't duplicate path stringJune McEnroe 2022-06-02Use stderr instead of /dev/tty, realloc buffer if lines too longJune McEnroe 2022-06-02Add initial working version of qfJune McEnroe 2022-05-29Set prompt for okshJune McEnroe