From cbef7f5d8a14d46ecdf0c25c3d38d26598a66f8c Mon Sep 17 00:00:00 2001
From: Daiki Ueno <dueno@redhat.com>
Date: Tue, 10 Apr 2018 09:47:06 +0200
Subject: trust: Fix memleak in p11_enumerate_opt_filter

p11_kit_iter_add_filter() takes the ownership of given attributes.
Spotted by address sanitizer.
---
 trust/enumerate.c | 1 +
 1 file changed, 1 insertion(+)

(limited to 'trust')

diff --git a/trust/enumerate.c b/trust/enumerate.c
index 9b43b9b..e197765 100644
--- a/trust/enumerate.c
+++ b/trust/enumerate.c
@@ -613,6 +613,7 @@ p11_enumerate_opt_filter (p11_enumerate *ex,
 	}
 
 	p11_kit_iter_add_filter (ex->iter, attrs, p11_attrs_count (attrs));
+	p11_attrs_free (attrs);
 	ex->num_filters++;
 	return true;
 }
-- 
cgit v1.1