If the previous test had `keep == 1` set, this function inherits its
(unlocked) virDomainObj.

Signed-off-by: Tim Wiederhake <twied...@redhat.com>
---
 tests/qemuhotplugtest.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c
index 57d76845c6..d8d6a3a226 100644
--- a/tests/qemuhotplugtest.c
+++ b/tests/qemuhotplugtest.c
@@ -280,6 +280,7 @@ testQemuHotplug(const void *data)
 
     if (test->vm) {
         vm = test->vm;
+        virObjectLock(vm);
         if (!vm->def) {
             VIR_TEST_VERBOSE("test skipped due to failure of dependent test");
             goto cleanup;
-- 
2.31.1

Reply via email to