mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-10 04:58:12 -05:00
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:
+2
-3
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user