Skip to content

Commit 1b7cb89

Browse files
stefanbellergitster
authored andcommitted
update-index: fix a memleak
`old` is not used outside the loop and would get lost once we reach the goto. Signed-off-by: Stefan Beller <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2d9426b commit 1b7cb89

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

builtin/update-index.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,7 @@ static int do_reupdate(int ac, const char **av,
584584
path = xstrdup(ce->name);
585585
update_one(path);
586586
free(path);
587+
free(old);
587588
if (save_nr != active_nr)
588589
goto redo;
589590
}

0 commit comments

Comments
 (0)