neocgit

a more 'modern' version of cgit
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/neocgit

commit 144e3c6085cfea95868a799ee976ed221dd86d8a
parent 97da17b783697b4c5430f130ab449121d0692530
Author: Christian Hesse <mail@eworm.de>
Date:   Sat, 10 Oct 2015 16:56:26 +0200

ui-atom: fix resource leak: free before return

Coverity-id: 13946
Signed-off-by: Christian Hesse <mail@eworm.de>

Diffstat:
Mui-atom.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 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); }