From: Stefan Beller Date: Sat, 21 Mar 2015 00:28:01 GMT Subject: [PATCH 04/15] update-index: fix a memleak Message-ID: <1426897692-18322-5-git-send-email-sbeller@google.com> In-Reply-To: <1426897692-18322-1-git-send-email-sbeller@google.com> `old` is not used outside the loop and would get lost once we reach the goto. Signed-off-by: Stefan Beller --- builtin/update-index.c | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin/update-index.c b/builtin/update-index.c index 5878986..6271b54 100644 --- a/builtin/update-index.c +++ b/builtin/update-index.c @@ -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; } -- 2.3.0.81.gc37f363