mirror of
https://github.com/git/git.git
synced 2024-11-24 18:33:43 +08:00
Merge branch 'jt/fsck-code-cleanup' into maint
Plug recently introduced leaks in fsck. * jt/fsck-code-cleanup: fsck: fix leak when traversing trees
This commit is contained in:
commit
d78b7eb2d5
@ -171,7 +171,13 @@ static void mark_object_reachable(struct object *obj)
|
||||
|
||||
static int traverse_one_object(struct object *obj)
|
||||
{
|
||||
return fsck_walk(obj, obj, &fsck_walk_options);
|
||||
int result = fsck_walk(obj, obj, &fsck_walk_options);
|
||||
|
||||
if (obj->type == OBJ_TREE) {
|
||||
struct tree *tree = (struct tree *)obj;
|
||||
free_tree_buffer(tree);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static int traverse_reachable(void)
|
||||
|
Loading…
Reference in New Issue
Block a user