summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2015-10-09 11:15:44 +0000
committerJason A. Donenfeld <Jason@zx2c4.com>2015-10-09 11:58:25 +0000
commit896cd69dde04832f6b551f681b92bd4557092427 (patch)
tree62cfea388610819c05ea5e38b0c5b56385a30f08
parentad006918a570da32457461a5e59289b611d9a732 (diff)
downloadcgit-896cd69dde04832f6b551f681b92bd4557092427.tar
cgit-896cd69dde04832f6b551f681b92bd4557092427.tar.gz
cgit-896cd69dde04832f6b551f681b92bd4557092427.zip
ui-tree: fix resource leak: free before return
Coverity-id: 13938 Signed-off-by: Christian Hesse <mail@eworm.de>
-rw-r--r--ui-tree.c1
1 files changed, 1 insertions, 0 deletions
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("<tr><td colspan='3'>Bad object: %s %s</td></tr>",
name,
sha1_to_hex(sha1));
+ free(name);
return 0;
}
}