From ecd25f5262abeabe4cabe7a388e15e6da1283a33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Thu, 18 Dec 2008 16:49:49 +0000 Subject: [PATCH] fix device hotplug --- ChangeLog | 5 +++++ src/qemu_driver.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) 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; -- GitLab