diff options
Diffstat (limited to 'read-tree.c')
-rw-r--r-- | read-tree.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/read-tree.c b/read-tree.c index f8dc509a1f..f6298e5c21 100644 --- a/read-tree.c +++ b/read-tree.c @@ -11,11 +11,14 @@ static int unpack_tree(unsigned char *sha1) { void *buffer; unsigned long size; + int ret; buffer = read_object_with_reference(sha1, "tree", &size, 0); if (!buffer) return -1; - return read_tree(buffer, size, stage); + ret = read_tree(buffer, size, stage); + free(buffer); + return ret; } static char *lockfile_name; |