[libvirt] [PATCH 04/18] qemuMonitorTestFree: Join worker thread unconditionally
Michal Privoznik
mprivozn at redhat.com
Wed Oct 2 17:09:53 UTC 2013
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 at redhat.com>
---
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
More information about the libvir-list
mailing list