Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.zx2c4.com/cgit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
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] == '/')