[PATCH v4 20/19] branch: the ref_filter is not cleaned
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 18, 2023, 07:00 UTC
- Message-ID
- <xmqq1qns8gz4.fsf_-_@gitster.g>
- In-Reply-To
- <xmqqedrs8igj.fsf@gitster.g>
Recently, a test that uses "branch --point-at" was marked (incorrectly) as passing the leak tests, but it was premature.
As there is no API support to release the resource held by the ref_filter structure when we are done, let's mark the singleton instance that does not grow unbounded as such with UNLEAK() to squelch pointless leak checker errors.
Signed-off-by: Junio C Hamano <gitster@pobox.com> --- builtin/branch.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/builtin/branch.c b/builtin/branch.c index f63fd45edb..4fe7757670 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -742,6 +742,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix) if (filter.abbrev == -1) filter.abbrev = DEFAULT_ABBREV; filter.ignore_case = icase; + UNLEAK(filter); finalize_colopts(&colopts, -1); if (filter.verbose) {
-- 2.39.1-231-ga7caae2729