提交 a63a7a5a 编写于 作者: P Peter Krempa

qemumonitortestutils: Don't crash on non fully initialized test

The qemumonitorjsontest crashed when one of the initialization steps
done before starting the worker thread failed. This patch fixes this by
trying to pthread_join() the thread only after it was created.
上级 5bf61f38
......@@ -368,7 +368,8 @@ qemuMonitorTestFree(qemuMonitorTestPtr test)
virObjectUnref(test->vm);
virThreadJoin(&test->thread);
if (test->running)
virThreadJoin(&test->thread);
if (timer != -1)
virEventRemoveTimeout(timer);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册