mirror of
https://github.com/git/git.git
synced 2024-11-25 02:44:48 +08:00
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 <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
2d9426b049
commit
1b7cb8969c
@ -584,6 +584,7 @@ static int do_reupdate(int ac, const char **av,
|
||||
path = xstrdup(ce->name);
|
||||
update_one(path);
|
||||
free(path);
|
||||
free(old);
|
||||
if (save_nr != active_nr)
|
||||
goto redo;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user