neocgit

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

commit 7ef1a47991fee31c1eb1e1292bf715d577042f35
parent 525c815cc400bc49881144bcd7e7b717bbc1af5d
Author: Christian Hesse <mail@eworm.de>
Date:   Fri,  9 Oct 2015 14:55:47 +0200

ui-repolist: fix resource leak: free before return

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

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

diff --git a/ui-repolist.c b/ui-repolist.c @@ -18,8 +18,10 @@ static time_t read_agefile(char *path) char *buf; struct strbuf date_buf = STRBUF_INIT; - if (readfile(path, &buf, &size)) + if (readfile(path, &buf, &size)) { + free(buf); return -1; + } if (parse_date(buf, &date_buf) == 0) result = strtoul(date_buf.buf, NULL, 10);