diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-07-23 16:44:36 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-07-23 16:44:36 -0700 |
| commit | 1663299f09bd66ed849d446908857f9941600d7a (patch) | |
| tree | 54855db396868ddba3ac80dd462315e8a826da72 /builtin | |
| parent | Merge branch 'jc/do-not-scan-argv-without-parsing' into next (diff) | |
| parent | reflog: close leak of reflog expire entry (diff) | |
| download | git-1663299f09bd66ed849d446908857f9941600d7a.tar.gz git-1663299f09bd66ed849d446908857f9941600d7a.zip | |
Merge branch 'jk/unleak-reflog-expire-entry' into next
Leakfix.
* jk/unleak-reflog-expire-entry:
reflog: close leak of reflog expire entry
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/gc.c | 1 | ||||
| -rw-r--r-- | builtin/reflog.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/builtin/gc.c b/builtin/gc.c index fab8f4dd4f..a02d6b7806 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -346,6 +346,7 @@ static int reflog_expire_condition(struct gc_config *cfg UNUSED) count_reflog_entries, &data); reflog_expiry_cleanup(&data.policy); + reflog_clear_expire_config(&data.policy.opts); return data.count >= data.limit; } diff --git a/builtin/reflog.c b/builtin/reflog.c index 3acaf3e32c..d4da41aaea 100644 --- a/builtin/reflog.c +++ b/builtin/reflog.c @@ -283,6 +283,9 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix, &cb); free(ref); } + + reflog_clear_expire_config(&opts); + return status; } |
