[PATCH 04/18] qemuMonitorTestFree: Join worker thread unconditionally

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

 



The thread needs to be joined no matter if it was still running when
qemuMonitorTestFree is called or not. The worker is thread spawned in
qemuMonitorTestNew() and has to be joined.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 tests/qemumonitortestutils.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c
index cd43c7b..4989183 100644
--- a/tests/qemumonitortestutils.c
+++ b/tests/qemumonitortestutils.c
@@ -354,8 +354,7 @@ qemuMonitorTestFree(qemuMonitorTestPtr test)
 
     virObjectUnref(test->vm);
 
-    if (test->running)
-        virThreadJoin(&test->thread);
+    virThreadJoin(&test->thread);
 
     if (timer != -1)
         virEventRemoveTimeout(timer);
-- 
1.8.1.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]