mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-10-03 01:45:00 +03:00
openvz: Need to check 'vm' first before dereferencing 'def'
This commit is contained in:
committed by
Peter Krempa
parent
3f9d6c3566
commit
a75d762fcd
@@ -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",
|
||||
|
Reference in New Issue
Block a user