mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu_process: fix memleak found by coverity
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
2a8fabba18
commit
0c35a415f7
@ -2323,8 +2323,10 @@ qemuProcessInitPasswords(virConnectPtr conn,
|
||||
goto cleanup;
|
||||
|
||||
alias = vm->def->disks[i]->info.alias;
|
||||
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
|
||||
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) {
|
||||
VIR_FREE(secret);
|
||||
goto cleanup;
|
||||
}
|
||||
ret = qemuMonitorSetDrivePassphrase(priv->mon, alias, secret);
|
||||
VIR_FREE(secret);
|
||||
qemuDomainObjExitMonitor(driver, vm);
|
||||
|
Loading…
x
Reference in New Issue
Block a user