[PATCH 6/7] qemu: Fix possible memory leak in migration param processing

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

 



If virJSONValueArraySize(caps) <= 0, then we will still need to
virJSONValueFree(caps) because qemuMonitorSetMigrationCapabilities
won't consume it.

Found by Coverity

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

diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c
index 4f3b239637..3bbe50a8ed 100644
--- a/src/qemu/qemu_migration_params.c
+++ b/src/qemu/qemu_migration_params.c
@@ -771,6 +771,7 @@ qemuMigrationParamsApply(virQEMUDriverPtr driver,
         migParams->params[xbzrle].set = true;
 
     virJSONValueFree(params);
+    virJSONValueFree(caps);
 
     return ret;
 }
-- 
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