]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
fix device hotplug
authorGuido Günther <agx@sigxcpu.org>
Thu, 18 Dec 2008 16:49:49 +0000 (16:49 +0000)
committerGuido Günther <agx@sigxcpu.org>
Thu, 18 Dec 2008 16:49:49 +0000 (16:49 +0000)
ChangeLog
src/qemu_driver.c

index 678309130047296a34c47d157572bddab64b8bc6..a972277f9933293db684ef30bd712e56acd0bd7f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Dec 18 17:46:06 CET 2008 Guido Günther <agx@sigxcpu.org>
+
+       * src/qemu_driver.c (qemudDomainAttachDevice): only
+         free dev on failure
+
 Thu Dec 18 16:13:56 CET 2008 Guido Günther <agx@sigxcpu.org>
 
        Let qemu/kvm instances write a pid file
index bbab972b79a589f268b358ac04c73f02877afb97..900ad0165527845027f0150fbd9623e8384396f4 100644 (file)
@@ -3222,7 +3222,8 @@ static int qemudDomainAttachDevice(virDomainPtr dom,
     }
 
 cleanup:
-    virDomainDeviceDefFree(dev);
+    if (ret < 0)
+        virDomainDeviceDefFree(dev);
     if (vm)
         virDomainObjUnlock(vm);
     return ret;