* [PATCH] list-objects-filter: plug combine_filter_data leak
@ 2022-11-20 11:00 René Scharfe
0 siblings, 0 replies; only message in thread
From: René Scharfe @ 2022-11-20 11:00 UTC (permalink / raw)
To: Git List
Cc: Ævar Arnfjörð Bjarmason, Taylor Blau,
Junio C Hamano
filter_combine__init() allocates a struct combine_filter_data object and
assigns it to the filter_data member of struct filter_options. Release
it in the complementing filter_combine__free().
Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
---
Reported in https://lore.kernel.org/git/221112.86bkpcmm6i.gmgdl@evledraar.gmail.com/
list-objects-filter.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/list-objects-filter.c b/list-objects-filter.c
index 1c1ee3d1bb..b9543545ca 100644
--- a/list-objects-filter.c
+++ b/list-objects-filter.c
@@ -709,6 +709,7 @@ static void filter_combine__free(void *filter_data)
BUG("expected oidset to be cleared already");
}
free(d->sub);
+ free(d);
}
static void add_all(struct oidset *dest, struct oidset *src) {
--
2.38.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-20 11:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-20 11:00 [PATCH] list-objects-filter: plug combine_filter_data 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).