]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Don't skip over socket label cleanup
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 26 Sep 2012 14:46:47 +0000 (15:46 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 27 Sep 2012 09:11:44 +0000 (10:11 +0100)
If QEMU quits immediately after we opened the monitor it was
possible we would skip the clearing of the SELinux process
socket context

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/qemu/qemu_process.c

index 70b72afa00f33330b5c72f7a7dc9d9c0ce4858e5..ade64b7318b6aefc10cd226fecc11af5eb8f5701 100644 (file)
@@ -1242,12 +1242,11 @@ qemuConnectMonitor(struct qemud_driver *driver, virDomainObjPtr vm)
     virDomainObjLock(vm);
     priv->monStart = 0;
 
-    if (mon == NULL)
+    if (mon == NULL) {
         virObjectUnref(vm);
-
-    if (!virDomainObjIsActive(vm)) {
+    } else if (!virDomainObjIsActive(vm)) {
         qemuMonitorClose(mon);
-        goto error;
+        mon = NULL;
     }
     priv->mon = mon;