Replace virStoragePoolFree with virObjectUnref

Since virStoragePoolFree will call virObjectUnref anyway, let's just use that
directly so as to avoid the possibility that we inadvertently clear out
a pending error message when using the public API.
This commit is contained in:
John Ferlan
2014-12-02 11:03:40 -05:00
parent d1219054e3
commit adbbff5fb7
5 changed files with 7 additions and 20 deletions
+2 -3
View File
@@ -4665,7 +4665,7 @@ remoteDispatchConnectListAllStoragePools(virNetServerPtr server ATTRIBUTE_UNUSED
virNetMessageSaveError(rerr);
if (pools && npools > 0) {
for (i = 0; i < npools; i++)
virStoragePoolFree(pools[i]);
virObjectUnref(pools[i]);
VIR_FREE(pools);
}
return rv;
@@ -4731,8 +4731,7 @@ remoteDispatchStoragePoolListAllVolumes(virNetServerPtr server ATTRIBUTE_UNUSED,
virObjectUnref(vols[i]);
VIR_FREE(vols);
}
if (pool)
virStoragePoolFree(pool);
virObjectUnref(pool);
return rv;
}