list-objects-filter: plug combine_filter_data leak
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe committed
Nov 20, 2022 at 12:00 UTC
7c2dc122f91970ea89a8af0053fbc655a9d58517
1 file changed
+1
list-objects-filter.c
+1
@@ -709,6 +709,7 @@ static void filter_combine__free(void *filter_data)
709
BUG("expected oidset to be cleared already");
710
}
711
free(d->sub);
712
+ free(d);
713
}
714
715
static void add_all(struct oidset *dest, struct oidset *src) {