Skip to content

Commit ef00650

Browse files
René Scharfegitster
authored andcommitted
fix minor memory leak in get_tree_entry()
Signed-off-by: Rene Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 341d9a4 commit ef00650

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tree-walk.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ int get_tree_entry(const unsigned char *tree_sha1, const char *name, unsigned ch
250250

251251
if (name[0] == '\0') {
252252
hashcpy(sha1, root);
253+
free(tree);
253254
return 0;
254255
}
255256

0 commit comments

Comments
 (0)