The @meminfo allocated in qemuMonitorGetMemoryDeviceInfo() may be
lost when qemuDomainObjExitMonitor() failed.
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
rc = qemuMonitorGetMemoryDeviceInfo(priv->mon, &meminfo);
- if (qemuDomainObjExitMonitor(driver, vm) < 0)
+ if (qemuDomainObjExitMonitor(driver, vm) < 0) {
+ virHashFree(meminfo);
return -1;
+ }
/* if qemu doesn't support the info request, just carry on */
if (rc == -2)