mirror of https://gitee.com/openkylin/libvirt.git
qemu: Fix possible memory leak in migration param processing
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@redhat.com>
This commit is contained in:
parent
6df5d77723
commit
6a6a5463af
|
@ -771,6 +771,7 @@ qemuMigrationParamsApply(virQEMUDriverPtr driver,
|
|||
migParams->params[xbzrle].set = true;
|
||||
|
||||
virJSONValueFree(params);
|
||||
virJSONValueFree(caps);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue