the repository which powers this website
ui-blob: fix resource leak: free before return
Coverity-id: 13943 Signed-off-by: Christian Hesse <[email protected]>
Christian Hesse 2015-10-11
parent 08a2b81 · commit 3080212
-rw-r--r--ui-blob.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui-blob.c b/ui-blob.c
index d3c3a102..70a671e6 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;
}