[PATCH] list-objects-filter: plug pattern_list leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux