From 6eb855984775329078dc30c83996b5d306bbbe67 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 18 Apr 2017 14:02:51 +0200 Subject: [PATCH] checkout: fix memory leak Discovered via Coverity. Signed-off-by: Johannes Schindelin --- builtin/checkout.c | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin/checkout.c b/builtin/checkout.c index 81f07c3ef2..fd273cdf2a 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -232,6 +232,7 @@ static int checkout_merged(int pos, const struct checkout *state) if (!ce) die(_("make_cache_entry failed for path '%s'"), path); status = checkout_entry(ce, state, NULL); + free(ce); return status; }