diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-10-22 10:55:44 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-23 10:45:25 -0700 |
commit | 3c8150497f3c77a2c57e73c53bd3de933b85d9a3 (patch) | |
tree | e1cad970c4dcbb596aa5258fd84826d2b0a09a16 | |
parent | submodule--helper: fix small memory leaks (diff) | |
download | tgif-3c8150497f3c77a2c57e73c53bd3de933b85d9a3.tar.xz |
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 <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | builtin/reflog.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |