From: Guido Günther Date: Thu, 18 Dec 2008 16:49:49 +0000 (+0000) Subject: fix device hotplug X-Git-Tag: LIBVIRT_0_6_0~197 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecd25f5262abeabe4cabe7a388e15e6da1283a33;p=thirdparty%2Flibvirt.git fix device hotplug --- diff --git a/ChangeLog b/ChangeLog index 6783091300..a972277f99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Dec 18 17:46:06 CET 2008 Guido Günther + + * src/qemu_driver.c (qemudDomainAttachDevice): only + free dev on failure + Thu Dec 18 16:13:56 CET 2008 Guido Günther Let qemu/kvm instances write a pid file diff --git a/src/qemu_driver.c b/src/qemu_driver.c index bbab972b79..900ad01655 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -3222,7 +3222,8 @@ static int qemudDomainAttachDevice(virDomainPtr dom, } cleanup: - virDomainDeviceDefFree(dev); + if (ret < 0) + virDomainDeviceDefFree(dev); if (vm) virDomainObjUnlock(vm); return ret;