From: Ævar Arnfjörð Bjarmason Date: Fri, 22 Oct 2021 08:55:44 +0000 (+0200) Subject: reflog: free() ref given to us by dwim_log() X-Git-Tag: v2.34.0-rc0~15^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3c8150497f3c77a2c57e73c53bd3de933b85d9a3;p=thirdparty%2Fgit.git reflog: free() ref given to us by dwim_log() 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 --- 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; }