[cim][PATCH 1/2] Fix memory leak in set_other_id_info

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

 



model was allocated by asprintf but never freed after usage
and assignement.

Signed-off-by: Adam Majer <amajer@xxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux