提交 2504dbeb 编写于 作者: P Peter Krempa

qemu: process: Make it obvious that virDomainDefPostParse is called with NULL opaque

Commit c90fb5a8 added explicit use of the private copy of the qemu
capabilities to various places. The change to qemuProcessInit was bogus
though as at the point where we re-initiate the post parse callbacks
priv->qemuCaps is still NULL as we clear it after shutdown of the VM and
don't initiate it until a later point.

Using the value from priv->qemuCaps might mislead readers of the code
into thinking that something useful is being passed at that point so go
with an explicit NULL instead.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 ab163144
......@@ -5531,7 +5531,8 @@ qemuProcessInit(virQEMUDriverPtr driver,
if (vm->def->postParseFailed) {
VIR_DEBUG("re-running the post parse callback");
if (virDomainDefPostParse(vm->def, caps, 0, driver->xmlopt, priv->qemuCaps) < 0)
/* we don't have the private copy of qemuCaps at this point */
if (virDomainDefPostParse(vm->def, caps, 0, driver->xmlopt, NULL) < 0)
goto cleanup;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册