mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 11:31:16 +00:00
Introduce virStoragePoolSourceDeviceClear
Open-coding one VIR_FREE in the test suite just doesn't seem right.
This commit is contained in:
parent
cc8bc54bfc
commit
20f0cd4ca3
@ -356,6 +356,13 @@ virStoragePoolSourceAdapterClear(virStoragePoolSourceAdapter adapter)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
virStoragePoolSourceDeviceClear(virStoragePoolSourceDevicePtr dev)
|
||||||
|
{
|
||||||
|
VIR_FREE(dev->freeExtents);
|
||||||
|
VIR_FREE(dev->path);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
virStoragePoolSourceClear(virStoragePoolSourcePtr source)
|
virStoragePoolSourceClear(virStoragePoolSourcePtr source)
|
||||||
{
|
{
|
||||||
@ -369,10 +376,8 @@ virStoragePoolSourceClear(virStoragePoolSourcePtr source)
|
|||||||
}
|
}
|
||||||
VIR_FREE(source->hosts);
|
VIR_FREE(source->hosts);
|
||||||
|
|
||||||
for (i = 0; i < source->ndevice; i++) {
|
for (i = 0; i < source->ndevice; i++)
|
||||||
VIR_FREE(source->devices[i].freeExtents);
|
virStoragePoolSourceDeviceClear(&source->devices[i]);
|
||||||
VIR_FREE(source->devices[i].path);
|
|
||||||
}
|
|
||||||
VIR_FREE(source->devices);
|
VIR_FREE(source->devices);
|
||||||
VIR_FREE(source->dir);
|
VIR_FREE(source->dir);
|
||||||
VIR_FREE(source->name);
|
VIR_FREE(source->name);
|
||||||
|
@ -432,6 +432,7 @@ int virStoragePoolObjDeleteDef(virStoragePoolObjPtr pool);
|
|||||||
|
|
||||||
void virStorageVolDefFree(virStorageVolDefPtr def);
|
void virStorageVolDefFree(virStorageVolDefPtr def);
|
||||||
void virStoragePoolSourceClear(virStoragePoolSourcePtr source);
|
void virStoragePoolSourceClear(virStoragePoolSourcePtr source);
|
||||||
|
void virStoragePoolSourceDeviceClear(virStoragePoolSourceDevicePtr dev);
|
||||||
void virStoragePoolSourceFree(virStoragePoolSourcePtr source);
|
void virStoragePoolSourceFree(virStoragePoolSourcePtr source);
|
||||||
void virStoragePoolDefFree(virStoragePoolDefPtr def);
|
void virStoragePoolDefFree(virStoragePoolDefPtr def);
|
||||||
void virStoragePoolObjFree(virStoragePoolObjPtr pool);
|
void virStoragePoolObjFree(virStoragePoolObjPtr pool);
|
||||||
|
@ -710,6 +710,7 @@ virStoragePoolObjUnlock;
|
|||||||
virStoragePoolSourceAdapterTypeTypeFromString;
|
virStoragePoolSourceAdapterTypeTypeFromString;
|
||||||
virStoragePoolSourceAdapterTypeTypeToString;
|
virStoragePoolSourceAdapterTypeTypeToString;
|
||||||
virStoragePoolSourceClear;
|
virStoragePoolSourceClear;
|
||||||
|
virStoragePoolSourceDeviceClear;
|
||||||
virStoragePoolSourceFindDuplicate;
|
virStoragePoolSourceFindDuplicate;
|
||||||
virStoragePoolSourceFindDuplicateDevices;
|
virStoragePoolSourceFindDuplicateDevices;
|
||||||
virStoragePoolSourceFree;
|
virStoragePoolSourceFree;
|
||||||
|
Loading…
Reference in New Issue
Block a user