mirror of
https://git.zx2c4.com/cgit
synced 2024-11-22 16:38:42 +00:00
ui-shared: fix resource leak: free allocation from cgit_hosturl
Signed-off-by: Christian Hesse <mail@eworm.de>
This commit is contained in:
parent
f77e2a8cfa
commit
6edfc1672c
@ -730,7 +730,7 @@ void cgit_print_docstart(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *host = cgit_hosturl();
|
char *host = cgit_hosturl();
|
||||||
html(cgit_doctype);
|
html(cgit_doctype);
|
||||||
html("<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>\n");
|
html("<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>\n");
|
||||||
html("<head>\n");
|
html("<head>\n");
|
||||||
@ -755,7 +755,7 @@ void cgit_print_docstart(void)
|
|||||||
|
|
||||||
html("<link rel='alternate' title='Atom feed' href='");
|
html("<link rel='alternate' title='Atom feed' href='");
|
||||||
html(cgit_httpscheme());
|
html(cgit_httpscheme());
|
||||||
html_attr(cgit_hosturl());
|
html_attr(host);
|
||||||
fileurl = cgit_fileurl(ctx.repo->url, "atom", ctx.qry.vpath,
|
fileurl = cgit_fileurl(ctx.repo->url, "atom", ctx.qry.vpath,
|
||||||
sb.buf);
|
sb.buf);
|
||||||
html_attr(fileurl);
|
html_attr(fileurl);
|
||||||
@ -771,6 +771,7 @@ void cgit_print_docstart(void)
|
|||||||
html("<body>\n");
|
html("<body>\n");
|
||||||
if (ctx.cfg.header)
|
if (ctx.cfg.header)
|
||||||
html_include(ctx.cfg.header);
|
html_include(ctx.cfg.header);
|
||||||
|
free(host);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cgit_print_docend(void)
|
void cgit_print_docend(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user