[libvirt PATCH 1/7] tests: qemuMonitorTestFree: Unlock virDomainObj before freeing

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

 



virDomainObj contains a mutex. Destroying a locked mutex results in
undefined behavior.

Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 tests/qemumonitortestutils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c
index 143dd954e6..f316fe823f 100644
--- a/tests/qemumonitortestutils.c
+++ b/tests/qemumonitortestutils.c
@@ -411,7 +411,7 @@ qemuMonitorTestFree(qemuMonitorTest *test)
 
     g_object_unref(test->eventThread);
 
-    virObjectUnref(test->vm);
+    virDomainObjEndAPI(&test->vm);
 
     if (test->started)
         virThreadJoin(&test->thread);
-- 
2.31.1




[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]

  Powered by Linux