[PATCH 3/4] ui-plain: fix resource leak: free before return
Christian Hesse
list at eworm.de
Fri Oct 9 14:55:49 CEST 2015
From: Christian Hesse <mail at eworm.de>
Coverity-id: 13940
Signed-off-by: Christian Hesse <mail at eworm.de>
---
ui-plain.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ui-plain.c b/ui-plain.c
index 0dd1a8b..4c73607 100644
--- a/ui-plain.c
+++ b/ui-plain.c
@@ -51,6 +51,7 @@ static int print_object(const unsigned char *sha1, const char *path)
cgit_print_http_headers();
html_raw(buf, size);
free(mimetype);
+ free(buf);
return 1;
}
--
2.6.1
More information about the CGit
mailing list