[libvirt] [PATCH 1/4] qemu: Properly cleanup in security startup error path

Cole Robinson crobinso at redhat.com
Mon May 17 17:17:02 UTC 2010


Everything after hostdev setup needs to jump to cleanup on error.

Signed-off-by: Cole Robinson <crobinso at redhat.com>
---
 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 582fdee..80f96b7 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -3295,7 +3295,7 @@ static int qemudStartVMDaemon(virConnectPtr conn,
     if (driver->securityDriver &&
         driver->securityDriver->domainGenSecurityLabel &&
         driver->securityDriver->domainGenSecurityLabel(vm) < 0)
-        return -1;
+        goto cleanup;
 
     DEBUG0("Generating setting domain security labels (if required)");
     if (driver->securityDriver &&
-- 
1.6.6.1




More information about the libvir-list mailing list