]> granicus.if.org Git - cgit/commitdiff
ui-blob: fix resource leak: free before return
authorChristian Hesse <mail@eworm.de>
Sat, 10 Oct 2015 14:56:24 +0000 (16:56 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Sat, 10 Oct 2015 19:38:57 +0000 (21:38 +0200)
Coverity-id: 13943
Signed-off-by: Christian Hesse <mail@eworm.de>
ui-blob.c

index d3c3a102669fe9a56dba80d4c511f39ab8300189..70a671e6ca02b30e100f697994033aecac775ef7 100644 (file)
--- 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;
 }