diff options
author | Christian Hesse <mail@eworm.de> | 2015-10-09 13:15:47 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2015-10-09 14:00:56 +0200 |
commit | c5c0eb873e0b9e40ffc3e85b621310ee85059ceb (patch) | |
tree | 06a3a6e14a805de318635166912e8c3a1cc7c7ec /ui-shared.c | |
parent | ui-shared: fix resource leak: free allocation from cgit_fileurl (diff) | |
download | cgit-pink-c5c0eb873e0b9e40ffc3e85b621310ee85059ceb.tar.gz cgit-pink-c5c0eb873e0b9e40ffc3e85b621310ee85059ceb.zip |
ui-shared: return value of cgit_currenturl is not const
Signed-off-by: Christian Hesse <mail@eworm.de>
Diffstat (limited to '')
-rw-r--r-- | ui-shared.c | 4 |
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] == '/') |