git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] list-objects-filter: plug pattern_list leak
@ 2022-12-01 17:49 René Scharfe
  0 siblings, 0 replies; only message in thread
From: René Scharfe @ 2022-12-01 17:49 UTC (permalink / raw
  To: Git List; +Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason

filter_sparse_oid__init() uses add_patterns_from_blob_to_list() to
populate the struct pattern_list member of struct filter_sparse_data.
Release it in the complementing filter_sparse_free().

Signed-off-by: René Scharfe <l.s.r@web.de>
---
 list-objects-filter.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/list-objects-filter.c b/list-objects-filter.c
index b9543545ca..dfc3f49f4f 100644
--- a/list-objects-filter.c
+++ b/list-objects-filter.c
@@ -514,6 +514,7 @@ static enum list_objects_filter_result filter_sparse(
 static void filter_sparse_free(void *filter_data)
 {
 	struct filter_sparse_data *d = filter_data;
+	clear_pattern_list(&d->pl);
 	free(d->array_frame);
 	free(d);
 }
--
2.30.2

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-01 17:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-01 17:49 [PATCH] list-objects-filter: plug pattern_list leak René Scharfe

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).