From 3c8150497f3c77a2c57e73c53bd3de933b85d9a3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Fri, 22 Oct 2021 10:55:44 +0200 Subject: [PATCH] reflog: free() ref given to us by dwim_log() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When dwim_log() returns the "ref" is always ether NULL or an xstrdup()'d string. Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- builtin/reflog.c | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin/reflog.c b/builtin/reflog.c index bd4c669918..175c83e7cc 100644 --- a/builtin/reflog.c +++ b/builtin/reflog.c @@ -653,6 +653,7 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix) should_expire_reflog_ent, reflog_expiry_cleanup, &cb); + free(ref); } return status; } -- 2.52.0