summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/parser/utils.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/parser/utils.c b/test/parser/utils.c
index 9a6b2e1..6f78c2f 100644
--- a/test/parser/utils.c
+++ b/test/parser/utils.c
@@ -32,6 +32,14 @@ void __register_parser(struct parser *parser)
list_add(&parsers, &i->list);
}
+static void __attribute__((destructor)) __cleanup_parsers(void)
+{
+ struct p_item *item, *tmp;
+
+ list_for_each_entry_safe(&parsers, item, tmp, list)
+ talloc_free(item);
+}
+
static struct discover_device *test_create_device_simple(
struct discover_context *ctx)
{
OpenPOWER on IntegriCloud