Signed-off-by: John Ferlan <jfer...@redhat.com>
---
 tests/storagevolxml2argvtest.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/storagevolxml2argvtest.c b/tests/storagevolxml2argvtest.c
index 1b3003216d..73d9c4bc6b 100644
--- a/tests/storagevolxml2argvtest.c
+++ b/tests/storagevolxml2argvtest.c
@@ -110,7 +110,8 @@ testCompareXMLToArgvFiles(bool shouldFail,
     virStorageVolDefFree(inputvol);
     virCommandFree(cmd);
     VIR_FREE(actualCmdline);
-    virStoragePoolObjUnlock(obj);
+    if (obj)
+        virStoragePoolObjUnlock(obj);
     virStoragePoolObjFree(obj);
     virObjectUnref(conn);
     return ret;
-- 
2.13.6

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

Reply via email to