提交 309647c8 编写于 作者: J Jim Meyering

qemuInitPasswords: avoid unconditional leak

* src/qemu/qemu_driver.c (qemuInitPasswords): Free pass-phrase buffer.
上级 bc6a48c6
......@@ -1758,6 +1758,7 @@ qemuInitPasswords(virConnectPtr conn,
ret = qemuMonitorSetDrivePassphrase(priv->mon,
vm->def->disks[i]->info.alias,
secret);
VIR_FREE(secret);
qemuDomainObjExitMonitorWithDriver(driver, vm);
if (ret < 0)
goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册