fsck: fix leak when traversing trees
commitba3a08ca0ec0d800d2fdbe73984927c1d8199082
authorEric Wong <e@80x24.org>
Sat, 20 Jan 2018 07:43:51 +0000 (20 07:43 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 23 Jan 2018 18:18:37 +0000 (23 10:18 -0800)
treef15d26b873b541bbc23bb72d2b3fa8902fc78411
parent78e7b98f452dd8e6c4d88d28532a0a5e98885d59
fsck: fix leak when traversing trees

While fsck_walk/fsck_walk_tree/parse_tree populates "struct tree"
idempotently, it is still up to the fsck_walk caller to call
free_tree_buffer.

Fixes: ad2db4030e42890e ("fsck: remove redundant parse_tree() invocation")

Signed-off-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fsck.c