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:
Stefan Beller 2015-03-20 17:28:01 -07:00 committed by Junio C Hamano
parent 2d9426b049
commit 1b7cb8969c

View File

@ -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;
}