[PATCH 2/6] ui-blob: fix resource leak: free before return
Christian Hesse
list at eworm.de
Sat Oct 10 16:56:24 CEST 2015
From: Christian Hesse <mail at eworm.de>
Coverity-id: 13943
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 9824c90..1ded839 100644
--- a/ui-blob.c
+++ b/ui-blob.c
@@ -99,6 +99,7 @@ int cgit_print_file(char *path, const char *head, int file_only)
return -1;
buf[size] = '\0';
html_raw(buf, size);
+ free(buf);
return 0;
}
--
2.6.1
More information about the CGit
mailing list