diff options
author | Christian Hesse | 2015-10-10 16:56:26 +0200 |
---|---|---|
committer | Jason A. Donenfeld | 2015-10-10 21:40:05 +0200 |
commit | 144e3c6085cfea95868a799ee976ed221dd86d8a (patch) | |
tree | beceadf5941fc112b13eb243d028dbb4769c8060 | |
parent | 97da17b783697b4c5430f130ab449121d0692530 (diff) | |
download | cgit-144e3c6085cfea95868a799ee976ed221dd86d8a.tar.gz cgit-144e3c6085cfea95868a799ee976ed221dd86d8a.tar.bz2 cgit-144e3c6085cfea95868a799ee976ed221dd86d8a.zip |
ui-atom: fix resource leak: free before return
Coverity-id: 13946
Signed-off-by: Christian Hesse <mail@eworm.de>
-rw-r--r-- | ui-atom.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -80,7 +80,7 @@ static void add_entry(struct commit *commit, const char *host) | |||
80 | 80 | ||
81 | void cgit_print_atom(char *tip, char *path, int max_count) | 81 | void cgit_print_atom(char *tip, char *path, int max_count) |
82 | { | 82 | { |
83 | const char *host; | 83 | char *host; |
84 | const char *argv[] = {NULL, tip, NULL, NULL, NULL}; | 84 | const char *argv[] = {NULL, tip, NULL, NULL, NULL}; |
85 | struct commit *commit; | 85 | struct commit *commit; |
86 | struct rev_info rev; | 86 | struct rev_info rev; |
@@ -140,4 +140,5 @@ void cgit_print_atom(char *tip, char *path, int max_count) | |||
140 | commit->parents = NULL; | 140 | commit->parents = NULL; |
141 | } | 141 | } |
142 | html("</feed>\n"); | 142 | html("</feed>\n"); |
143 | free(host); | ||
143 | } | 144 | } |