diff options
author | Andy Green | 2018-06-13 10:02:00 +0800 |
---|---|---|
committer | John Keeping | 2018-06-16 15:20:11 +0100 |
commit | 7708859c4dcebff1e43516c23a8bf80f88fcea35 (patch) | |
tree | e09d7f84591af560978b7611bf2c1742a89ba868 /ui-tree.c | |
parent | 48f175083ae9ee03aa5ed7cddfbf74edf6d75774 (diff) | |
download | cgit-7708859c4dcebff1e43516c23a8bf80f88fcea35.tar.gz cgit-7708859c4dcebff1e43516c23a8bf80f88fcea35.tar.bz2 cgit-7708859c4dcebff1e43516c23a8bf80f88fcea35.zip |
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>
Diffstat (limited to 'ui-tree.c')
-rw-r--r-- | ui-tree.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -127,6 +127,8 @@ static void print_object(const unsigned char *sha1, char *path, const char *base | |||
127 | print_binary_buffer(buf, size); | 127 | print_binary_buffer(buf, size); |
128 | else | 128 | else |
129 | print_text_buffer(basename, buf, size); | 129 | print_text_buffer(basename, buf, size); |
130 | |||
131 | free(buf); | ||
130 | } | 132 | } |
131 | 133 | ||
132 | struct single_tree_ctx { | 134 | struct single_tree_ctx { |