Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.zx2c4.com/cgit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Green <andy@warmcat.com>2018-06-13 05:02:00 +0300
committerJohn Keeping <john@keeping.me.uk>2018-06-16 17:20:11 +0300
commit7708859c4dcebff1e43516c23a8bf80f88fcea35 (patch)
treee09d7f84591af560978b7611bf2c1742a89ba868
parent48f175083ae9ee03aa5ed7cddfbf74edf6d75774 (diff)
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>
-rw-r--r--ui-tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui-tree.c b/ui-tree.c
index 67fd1bc..524de0f 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -127,6 +127,8 @@ static void print_object(const unsigned char *sha1, char *path, const char *base
print_binary_buffer(buf, size);
else
print_text_buffer(basename, buf, size);
+
+ free(buf);
}
struct single_tree_ctx {