[libvirt] [cim][PATCH 1/2] Fix memory leak in set_other_id_info
Adam Majer
amajer at suse.de
Fri Dec 15 14:05:34 UTC 2017
model was allocated by asprintf but never freed after usage
and assignement.
Signed-off-by: Adam Majer <amajer at suse.de>
---
src/Virt_ComputerSystem.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/Virt_ComputerSystem.c b/src/Virt_ComputerSystem.c
index da07f93..b4930ac 100644
--- a/src/Virt_ComputerSystem.c
+++ b/src/Virt_ComputerSystem.c
@@ -417,6 +417,8 @@ static int set_other_id_info(const CMPIBroker *broker,
CMPI_string);
}
+ free(model);
+
CMSetProperty(instance, "OtherIdentifyingInfo",
&id_info, CMPI_stringA);
--
2.13.6
More information about the libvir-list
mailing list