[PATCH 1/6] ui-blob: fix resource leak: free before return

Christian Hesse list at eworm.de
Sat Oct 10 16:56:23 CEST 2015


From: Christian Hesse <mail at eworm.de>

Coverity-id: 13944
Signed-off-by: Christian Hesse <mail at eworm.de>
---
 ui-blob.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ui-blob.c b/ui-blob.c
index d3c3a10..9824c90 100644
--- a/ui-blob.c
+++ b/ui-blob.c
@@ -170,4 +170,5 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl
 	ctx.page.filename = path;
 	cgit_print_http_headers();
 	html_raw(buf, size);
+	free(buf);
 }
-- 
2.6.1



More information about the CGit mailing list