about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ui-shared.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 89c4897..d9f8258 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -746,16 +746,19 @@ void cgit_print_docstart(void)
 		html("'/>\n");
 	}
 	if (host && ctx.repo && ctx.qry.head) {
+		char *fileurl;
 		struct strbuf sb = STRBUF_INIT;
 		strbuf_addf(&sb, "h=%s", ctx.qry.head);
 
 		html("<link rel='alternate' title='Atom feed' href='");
 		html(cgit_httpscheme());
 		html_attr(cgit_hosturl());
-		html_attr(cgit_fileurl(ctx.repo->url, "atom", ctx.qry.vpath,
-				       sb.buf));
+		fileurl = cgit_fileurl(ctx.repo->url, "atom", ctx.qry.vpath,
+				       sb.buf);
+		html_attr(fileurl);
 		html("' type='application/atom+xml'/>\n");
 		strbuf_release(&sb);
+		free(fileurl);
 	}
 	if (ctx.repo)
 		cgit_add_clone_urls(print_rel_vcs_link);
@@ -997,9 +1000,12 @@ void cgit_print_pageheader(void)
 					ctx.qry.head, ctx.qry.vpath);
 		html("</td><td class='form'>");
 		html("<form class='right' method='get' action='");
-		if (ctx.cfg.virtual_root)
-			html_url_path(cgit_fileurl(ctx.qry.repo, "log",
-						   ctx.qry.vpath, NULL));
+		if (ctx.cfg.virtual_root) {
+			char *fileurl = cgit_fileurl(ctx.qry.repo, "log",
+						   ctx.qry.vpath, NULL);
+			html_url_path(fileurl);
+			free(fileurl);
+		}
 		html("'>\n");
 		cgit_add_hidden_formfields(1, 0, "log");
 		html("<select name='qt'>\n");
&id=3c2d8233b880cb22e2330a877f7d9ee1a9a8a5fa&follow=1'>Madvise RANDOM and NOSYNCJune McEnroe 2017-07-31Fix removing clients from clientCastJune McEnroe 2017-07-31Build with debug infoJune McEnroe 2017-07-31Don't dump tiles in coreJune McEnroe 2017-07-31Use designated initializers for messagesJune McEnroe 2017-07-31Show other clients' cursorsJune McEnroe 2017-07-31Perform enter as two moves rather than a loopJune McEnroe 2017-07-31Track tile access countsJune McEnroe 2017-07-31Adjust move speed in clientJune McEnroe 2017-07-31Handle large movesJune McEnroe 2017-07-30Optimize builds for chrootJune McEnroe 2017-07-30Persist bright across color changesJune McEnroe 2017-07-30Add index.htmlJune McEnroe 2017-07-30Add snapshot.shJune McEnroe 2017-07-30Fix termcap patch for background colorsJune McEnroe 2017-07-30Update helpJune McEnroe 2017-07-30Fix help to track colorJune McEnroe 2017-07-30Support background colorsJune McEnroe 2017-07-30Track color only client-sideJune McEnroe 2017-07-30Add ostensible support for background colorsJune McEnroe 2017-07-30Add tile create and access timestampsJune McEnroe 2017-07-30Assert stable struct Tile field offsetsJune McEnroe 2017-07-30Add chroot.shJune McEnroe 2017-07-30Add ` commandJune McEnroe 2017-07-30Add sshd_configJune McEnroe 2017-07-30Add termcap patchJune McEnroe