aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2015-10-10 16:56:26 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2015-10-10 21:40:05 +0200
commit144e3c6085cfea95868a799ee976ed221dd86d8a (patch)
treebeceadf5941fc112b13eb243d028dbb4769c8060
parent97da17b783697b4c5430f130ab449121d0692530 (diff)
downloadpkg-cgit-144e3c6085cfea95868a799ee976ed221dd86d8a.zip
pkg-cgit-144e3c6085cfea95868a799ee976ed221dd86d8a.tar.gz
pkg-cgit-144e3c6085cfea95868a799ee976ed221dd86d8a.tar.bz2
ui-atom: fix resource leak: free before return
Coverity-id: 13946 Signed-off-by: Christian Hesse <mail@eworm.de>
-rw-r--r--ui-atom.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui-atom.c b/ui-atom.c
index d7138fb..fab4b0f 100644
--- a/ui-atom.c
+++ b/ui-atom.c
@@ -80,7 +80,7 @@ static void add_entry(struct commit *commit, const char *host)
void cgit_print_atom(char *tip, char *path, int max_count)
{
- const char *host;
+ char *host;
const char *argv[] = {NULL, tip, NULL, NULL, NULL};
struct commit *commit;
struct rev_info rev;
@@ -140,4 +140,5 @@ void cgit_print_atom(char *tip, char *path, int max_count)
commit->parents = NULL;
}
html("</feed>\n");
+ free(host);
}