about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2015-10-10 16:56:24 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2015-10-10 21:38:57 +0200
commit30802126d48e145191a281a7f43109edfbcf490f (patch)
tree3246c594ad2b5a07706106a8d58a0fe90f0fe6b2
parentui-plain: fix resource leak: free before assigning NULL (diff)
downloadcgit-pink-30802126d48e145191a281a7f43109edfbcf490f.tar.gz
cgit-pink-30802126d48e145191a281a7f43109edfbcf490f.zip
ui-blob: fix resource leak: free before return
Coverity-id: 13943
Signed-off-by: Christian Hesse <mail@eworm.de>
Diffstat (limited to '')
-rw-r--r--ui-blob.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui-blob.c b/ui-blob.c
index d3c3a10..70a671e 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;
 }