tests: Fix possible NULL deref

This commit is contained in:
John Ferlan
2017-10-06 06:53:05 -04:00
parent ee5498304f
commit adfa9b3044
+2 -1
View File
@@ -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;