[PATCH] conf: Avoid leaking blockers from virDomainCapsCPUModel

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

 



When adding CPU usability blockers I forgot to properly free them when
in virDomainCapsCPUModelsDispose.

Reported-by: Marc Hartmayer <mhartmay@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 src/conf/domain_capabilities.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c
index 729d905e2..7f96ff386 100644
--- a/src/conf/domain_capabilities.c
+++ b/src/conf/domain_capabilities.c
@@ -94,8 +94,10 @@ virDomainCapsCPUModelsDispose(void *obj)
     virDomainCapsCPUModelsPtr cpuModels = obj;
     size_t i;
 
-    for (i = 0; i < cpuModels->nmodels; i++)
+    for (i = 0; i < cpuModels->nmodels; i++) {
         VIR_FREE(cpuModels->models[i].name);
+        virStringListFree(cpuModels->models[i].blockers);
+    }
 
     VIR_FREE(cpuModels->models);
 }
-- 
2.14.3

--
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