From: list at eworm.de (Christian Hesse)
Subject: [PATCH 5/6] ui-atom: fix resource leak: free allocation from cgit_pageurl
Date: Sat, 10 Oct 2015 16:56:27 +0200 [thread overview]
Message-ID: <1444488988-20082-5-git-send-email-list@eworm.de> (raw)
In-Reply-To: <1444488988-20082-1-git-send-email-list@eworm.de>
From: Christian Hesse <mail at eworm.de>
Coverity-id: 13945
Signed-off-by: Christian Hesse <mail at eworm.de>
---
ui-atom.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ui-atom.c b/ui-atom.c
index fab4b0f..e186299 100644
--- a/ui-atom.c
+++ b/ui-atom.c
@@ -53,14 +53,17 @@ static void add_entry(struct commit *commit, const char *host)
cgit_print_date(info->author_date, FMT_ATOMDATE, 0);
html("</published>\n");
if (host) {
+ char *pageurl;
html("<link rel='alternate' type='text/html' href='");
html(cgit_httpscheme());
html_attr(host);
- html_attr(cgit_pageurl(ctx.repo->url, "commit", NULL));
+ pageurl = cgit_pageurl(ctx.repo->url, "commit", NULL);
+ html_attr(pageurl);
if (ctx.cfg.virtual_root)
delim = '?';
htmlf("%cid=%s", delim, hex);
html("'/>\n");
+ free(pageurl);
}
htmlf("<id>%s</id>\n", hex);
html("<content type='text'>\n");
--
2.6.1
next prev parent reply other threads:[~2015-10-10 14:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-10 14:56 [PATCH 1/6] ui-blob: fix resource leak: free before return list
2015-10-10 14:56 ` [PATCH 2/6] " list
2015-10-10 19:38 ` Jason
2015-10-10 14:56 ` [PATCH 3/6] ui-atom: fix resource leak: free allocation from cgit_repourl list
2015-10-10 14:56 ` [PATCH 4/6] ui-atom: fix resource leak: free before return list
2015-10-10 19:40 ` Jason
2015-10-10 14:56 ` list [this message]
2015-10-10 19:40 ` [PATCH 5/6] ui-atom: fix resource leak: free allocation from cgit_pageurl Jason
2015-10-10 14:56 ` [PATCH 6/6] cache: fix resource leak: close file handle before return list
2015-10-10 19:41 ` Jason
2015-10-10 19:39 ` [PATCH 1/6] ui-blob: fix resource leak: free " Jason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1444488988-20082-5-git-send-email-list@eworm.de \
--to=cgit@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).