[PATCH REPOST 2/6] tests: Fix possible NULL deref

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

 



Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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