提交 a75d762f 编写于 作者: J John Ferlan 提交者: Peter Krempa

openvz: Need to check 'vm' first before dereferencing 'def'

上级 3f9d6c35
......@@ -2053,13 +2053,13 @@ openvzDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
openvzDriverLock(driver);
vm = virDomainFindByUUID(&driver->domains, dom->uuid);
vmdef = vm->def;
if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN, "%s",
_("no domain with matching uuid"));
goto cleanup;
}
vmdef = vm->def;
if (virStrToLong_i(vmdef->name, NULL, 10, &veid) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册