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:
authorChristian Hesse <mail@eworm.de>2015-10-10 17:56:25 +0300
committerJason A. Donenfeld <Jason@zx2c4.com>2015-10-10 22:39:53 +0300
commit97da17b783697b4c5430f130ab449121d0692530 (patch)
treed46e87dafbf26cd21233aee0f6dbdac30f1bd98a
parent7320bfa893bdb8ff873c3827c3dac1ce0d4034ea (diff)
ui-atom: fix resource leak: free allocation from cgit_repourl
Coverity-id: 13947 Signed-off-by: Christian Hesse <mail@eworm.de>
-rw-r--r--ui-atom.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui-atom.c b/ui-atom.c
index e2b39ee..d7138fb 100644
--- a/ui-atom.c
+++ b/ui-atom.c
@@ -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);