Author: Andy Green <andy@warmcat.com>
ui-tree: free read_sha1_file() buffer after use Free up the buffer allocated in read_sha1_file() Signed-off-by: Andy Green <andy@warmcat.com> Signed-off-by: John Keeping <john@keeping.me.uk>
ui-tree.c | 2 ++
diff --git a/ui-tree.c b/ui-tree.c index 67fd1bc51652b990be5e06be45d05821c7f67a02..524de0fc30d91caa8305cfd4ba40e74110b6a5f2 100644 --- a/ui-tree.c +++ b/ui-tree.c @@ -127,6 +127,8 @@ if (buffer_is_binary(buf, size)) print_binary_buffer(buf, size); else print_text_buffer(basename, buf, size); + + free(buf); } struct single_tree_ctx {