qemu: Fix typo in qemuDomainModifyDeviceFlags

One of our latest commits fbe87126 introduced this nasty typo:
func(vmdef, ...); where func() dereference vmdef->ncontrollers,
and vmdef was initialized to NULL. This leaves us with unconditional
immediate segfault. It should be vm->def instead.
This commit is contained in:
Michal Privoznik 2012-08-02 16:25:41 +02:00
parent b5c5ad365e
commit e94c0a09ee

View File

@ -5833,7 +5833,7 @@ qemuDomainModifyDeviceFlags(virDomainPtr dom, const char *xml,
} }
if (flags & VIR_DOMAIN_AFFECT_CONFIG) { if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
if (virDomainDefCompatibleDevice(vmdef, dev) < 0) if (virDomainDefCompatibleDevice(vm->def, dev) < 0)
goto endjob; goto endjob;
/* Make a copy for updated domain. */ /* Make a copy for updated domain. */