diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-09-17 11:37:33 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-09-17 11:37:33 -0700 |
commit | b8f23112f0415cc86eb0ec576ac7e16c7c9d78b8 (patch) | |
tree | 245a2c5f2541f4151372b323bdbbb497979a262b /tree.c | |
parent | Merge branch 'maint' (diff) | |
parent | clear parsed flag when we free tree buffers (diff) | |
download | tgif-b8f23112f0415cc86eb0ec576ac7e16c7c9d78b8.tar.xz |
Merge branch 'jk/free-tree-buffer'
* jk/free-tree-buffer:
clear parsed flag when we free tree buffers
Diffstat (limited to 'tree.c')
-rw-r--r-- | tree.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -225,6 +225,14 @@ int parse_tree(struct tree *item) return parse_tree_buffer(item, buffer, size); } +void free_tree_buffer(struct tree *tree) +{ + free(tree->buffer); + tree->buffer = NULL; + tree->size = 0; + tree->object.parsed = 0; +} + struct tree *parse_tree_indirect(const unsigned char *sha1) { struct object *obj = parse_object(sha1); |