[libvirt] [PATCH] Don't skip over socket label cleanup
Daniel P. Berrange
berrange at redhat.com
Wed Sep 26 14:49:40 UTC 2012
From: "Daniel P. Berrange" <berrange at redhat.com>
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 at redhat.com>
---
src/qemu/qemu_process.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 70b72af..ade64b7 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -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;
--
1.7.11.2
More information about the libvir-list
mailing list