From 70d6f6a5407d500d72fc90f1b9661ec27d40f2f6 Mon Sep 17 00:00:00 2001 From: Dongwoo Lee Date: Mon, 28 Mar 2022 20:47:14 +0900 Subject: [PATCH] util: resource: Unset attrs when resource is deleted To free memory allocated to data_value arrays of resource, unset attr function is invoked while deleting resource. Change-Id: Id5c87a7a5afb64c4bd94da1894ad8fca7ec1b272 Signed-off-by: Dongwoo Lee --- src/util/resource.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/resource.c b/src/util/resource.c index 6605154..5149726 100644 --- a/src/util/resource.c +++ b/src/util/resource.c @@ -153,6 +153,8 @@ void delete_resource(struct resource *resource) if (resource->driver && resource->driver->ops.exit) resource->driver->ops.exit(resource); + unset_resource_attr_interest(resource, RESOURCE_ATTR_MASK); + do_delete_resource(resource); } -- 2.7.4