From 896cd69dde04832f6b551f681b92bd4557092427 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 9 Oct 2015 13:15:44 +0200 Subject: ui-tree: fix resource leak: free before return Coverity-id: 13938 Signed-off-by: Christian Hesse --- ui-tree.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ui-tree.c b/ui-tree.c index 1b310d5..d71503d 100644 --- a/ui-tree.c +++ b/ui-tree.c @@ -143,6 +143,7 @@ static int ls_item(const unsigned char *sha1, struct strbuf *base, htmlf("Bad object: %s %s", name, sha1_to_hex(sha1)); + free(name); return 0; } } -- cgit 1.4.1-21-gabe81