tests: Fix possible NULL deref

This commit is contained in:
John Ferlan 2017-09-20 07:47:17 -04:00
parent ee5498304f
commit adfa9b3044

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;