about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2016-10-10 20:17:51 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2016-10-12 14:13:10 +0200
commit7fea585e252ee7a584e4b2d679009518bab48ebe (patch)
treed8633d6d1f0a8d97163fc1b7f826b0f942e4f612
parentUse skip_prefix() to get rid of magic constants (diff)
downloadcgit-pink-7fea585e252ee7a584e4b2d679009518bab48ebe.tar.gz
cgit-pink-7fea585e252ee7a584e4b2d679009518bab48ebe.zip
ui-repolist: fix memory leak
Diffstat (limited to '')
-rw-r--r--ui-repolist.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui-repolist.c b/ui-repolist.c
index 1d9a7f7..7158bf7 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -343,13 +343,15 @@ void cgit_print_repolist(void)
 				html_txt(ctx.repo->owner);
 				cgit_close_filter(ctx.repo->owner_filter);
 			} else {
+				char *currenturl = cgit_currenturl();
 				html("<a href='");
-				html_attr(cgit_currenturl());
+				html_attr(currenturl);
 				html("?q=");
 				html_url_arg(ctx.repo->owner);
 				html("'>");
 				html_txt(ctx.repo->owner);
 				html("</a>");
+				free(currenturl);
 			}
 			html("</td><td>");
 		}
href='/src/commit/home/.config/git/config?id=f7af3791d661fd780b8da773499c10ee05d03569&follow=1'>Set push.autoSetupRemoteJune McEnroe 2022-07-08Remove 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