X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/37fce9916a264e23c0639df56ca3ecbbdc1c84b8..c5c0eb873e0b9e40ffc3e85b621310ee85059ceb:/ui-shared.c 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] == '/')