[libvirt] [PATCH] qemu: Fix typo in qemuDomainModifyDeviceFlags

Michal Privoznik mprivozn at redhat.com
Thu Aug 2 14:30:14 UTC 2012


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.
---

Despite this could qualify to be pushed under trivial rule, I'd feel more
comfortable with an ACK.

 src/qemu/qemu_driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index b3f946c..270e4dd 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -5833,7 +5833,7 @@ qemuDomainModifyDeviceFlags(virDomainPtr dom, const char *xml,
     }
 
     if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
-        if (virDomainDefCompatibleDevice(vmdef, dev) < 0)
+        if (virDomainDefCompatibleDevice(vm->def, dev) < 0)
             goto endjob;
 
         /* Make a copy for updated domain. */
-- 
1.7.8.6




More information about the libvir-list mailing list