[PATCH 8/9] conf: Fix memory leak in virCPUDefParseXML

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

 



Since a08669c31, @tsc is not automatically free'd by any g_auto* method.

Found by Coverity.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/conf/cpu_conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
index b40737e407..e1b0a5653f 100644
--- a/src/conf/cpu_conf.c
+++ b/src/conf/cpu_conf.c
@@ -335,7 +335,7 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt,
     g_autofree char *vendor_id = NULL;
     g_autofree char *tscScaling = NULL;
     g_autofree char *migratable = NULL;
-    virHostCPUTscInfoPtr tsc = NULL;
+    g_autofree virHostCPUTscInfoPtr tsc = NULL;
 
     *cpu = NULL;
 
-- 
2.25.4




[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