[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 1/3] qemu: avoid qemu_driver being unlocked twice when virThreadPoolNew() failed



---
 src/qemu/qemu_driver.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index dd12dc8..f843dc8 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -628,10 +628,14 @@ qemudStartup(int privileged) {
 
     qemuAutostartDomains(qemu_driver);
 
+    /* Lock qemu_drive again as we will modify it */
+    qemuDriverLock(qemu_driver);
     qemu_driver->workerPool = virThreadPoolNew(0, 1, processWatchdogEvent, qemu_driver);
     if (!qemu_driver->workerPool)
         goto error;
 
+    qemuDriverUnlock(qemu_driver);
+
     if (conn)
         virConnectClose(conn);
 
-- 
1.7.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]