提交 0c35a415 编写于 作者: P Pavel Hrdina

qemu_process: fix memleak found by coverity

Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
上级 2a8fabba
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册