提交 e5673ed4 编写于 作者: M Michal Privoznik

virDomainDeviceValidateAliasForHotplug: Use correct domain defintion

https://bugzilla.redhat.com/show_bug.cgi?id=1553075

For some weird reason this function is getting live and
persistent def for domain but then accesses vm->def and
vm->newDef directly. This is rather unsafe as we can be
accessing NULL pointer.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 fc0f8563
......@@ -5679,11 +5679,11 @@ virDomainDeviceValidateAliasForHotplug(virDomainObjPtr vm,
return -1;
if (persDef &&
virDomainDeviceValidateAliasImpl(vm->def, dev) < 0)
virDomainDeviceValidateAliasImpl(persDef, dev) < 0)
return -1;
if (liveDef &&
virDomainDeviceValidateAliasImpl(vm->newDef, dev) < 0)
virDomainDeviceValidateAliasImpl(liveDef, dev) < 0)
return -1;
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册