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;