]> git.ipfire.org Git - thirdparty/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)
committerCole Robinson <crobinso@redhat.com>
Wed, 17 Oct 2012 20:50:02 +0000 (16:50 -0400)
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>
(cherry picked from commit 0b62c0736a2a365b9c682d58fa9f66eaea6ec7e4)

src/qemu/qemu_process.c

index 3cd30afb79cf6922a93ce87dc00f01d00feed559..67f7e13657c4061bc83c976b9ea6e62840f0d30b 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;