summaryrefslogtreecommitdiff
path: root/ui-shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-shared.c')
-rw-r--r--ui-shared.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui-shared.c b/ui-shared.c
index d9f8258..b739675 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -65,10 +65,10 @@ const char *cgit_hosturl(void)
return fmtalloc("%s:%s", ctx.env.server_name, ctx.env.server_port);
}
-const char *cgit_currenturl(void)
+char *cgit_currenturl(void)
{
if (!ctx.qry.url)
- return cgit_rooturl();
+ return xstrdup(cgit_rooturl());
const char *root = cgit_rooturl();
size_t len = strlen(root);
if (len && root[len - 1] == '/')