about summary refs log tree commit diff
path: root/ui-repolist.c
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 /ui-repolist.c
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 'ui-repolist.c')
-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>");
 		}
7be2c109431a7b49b7b6053&follow=1'>Add imbox portJune McEnroe 2020-11-24Update pounce to 2.1June McEnroe 2020-11-24Update libretls to 3.3.0June McEnroe 2020-11-17Update catgirl to 1.3June McEnroe 2020-11-17Update libretls to 3.2.2June McEnroe 2020-09-29Update libretls to 3.2.1June McEnroe 2020-09-10Update catgirl to 1.2June McEnroe 2020-09-09Add pounce-palaver portJune McEnroe 2020-09-09Update pounce to 2.0June McEnroe 2020-09-09Update litterbox to 1.6June McEnroe 2020-08-23Add scooper portJune McEnroe 2020-08-23Add catsit portJune McEnroe 2020-08-13Update pounce to 1.4p2June McEnroe 2020-08-11Update pounce to 1.4p1June McEnroe 2020-08-10Add litterbox portJune McEnroe 2020-08-10Add missing USES=pkgconfig to pounceJune McEnroe