[PATCH 06/11] ui-tree: free read_sha1_file() buffer after use

Andy Green andy at warmcat.com
Wed Jun 13 04:02:00 CEST 2018


Free up the buffer allocated in read_sha1_file()

Signed-off-by: Andy Green <andy at warmcat.com>
---
 ui-tree.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/ui-tree.c b/ui-tree.c
index 723e16e..fe5dc75 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -222,6 +222,7 @@ static void print_object(const unsigned char *sha1, char *path, const char *base
 	}
 
 	free(mimetype);
+	free(buf);
 }
 
 struct single_tree_ctx {



More information about the CGit mailing list