[libvirt] [PATCH 6/7] qemu: Fix possible memory leak in migration param processing
John Ferlan
jferlan at redhat.com
Tue Apr 17 16:22:17 UTC 2018
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 at redhat.com>
---
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
More information about the libvir-list
mailing list