ui-atom: fix resource leak: free allocation from cgit_repourl

Coverity-id: 13947
Signed-off-by: Christian Hesse <mail@eworm.de>
This commit is contained in:
Christian Hesse 2015-10-10 16:56:25 +02:00 committed by Jason A. Donenfeld
parent 7320bfa893
commit 97da17b783

View File

@ -125,11 +125,13 @@ void cgit_print_atom(char *tip, char *path, int max_count)
html_txt(ctx.repo->desc);
html("</subtitle>\n");
if (host) {
char *repourl = cgit_repourl(ctx.repo->url);
html("<link rel='alternate' type='text/html' href='");
html(cgit_httpscheme());
html_attr(host);
html_attr(cgit_repourl(ctx.repo->url));
html_attr(repourl);
html("'/>\n");
free(repourl);
}
while ((commit = get_revision(&rev)) != NULL) {
add_entry(commit, host);