Skip to content

Commit 3c81504

Browse files
avargitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c270b05 commit 3c81504

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

builtin/reflog.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,7 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix)
653653
should_expire_reflog_ent,
654654
reflog_expiry_cleanup,
655655
&cb);
656+
free(ref);
656657
}
657658
return status;
658659
}

0 commit comments

Comments
 (0)