mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
conf: storage: Introduce virStoragePoolSourceListFree
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
ff8557b433
commit
3776b6a93d
@ -1803,3 +1803,19 @@ virStoragePoolSourceListFormat(virStoragePoolSourceList *def)
|
||||
|
||||
return virBufferContentAndReset(&buf);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
virStoragePoolSourceListFree(virStoragePoolSourceList *list)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
if (!list)
|
||||
return;
|
||||
|
||||
for (i = 0; i < list->nsources; i++)
|
||||
virStoragePoolSourceClear(&list->sources[i]);
|
||||
|
||||
g_free(list->sources);
|
||||
g_free(list);
|
||||
}
|
||||
|
@ -266,6 +266,11 @@ struct _virStoragePoolSourceList {
|
||||
virStoragePoolSource *sources;
|
||||
};
|
||||
|
||||
void
|
||||
virStoragePoolSourceListFree(virStoragePoolSourceList *list);
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virStoragePoolSourceList, virStoragePoolSourceListFree);
|
||||
|
||||
|
||||
virStoragePoolDef *
|
||||
virStoragePoolDefParseXML(xmlXPathContextPtr ctxt);
|
||||
|
||||
|
@ -1048,6 +1048,7 @@ virStoragePoolSourceClear;
|
||||
virStoragePoolSourceDeviceClear;
|
||||
virStoragePoolSourceFree;
|
||||
virStoragePoolSourceListFormat;
|
||||
virStoragePoolSourceListFree;
|
||||
virStoragePoolSourceListNewSource;
|
||||
virStoragePoolTypeFromString;
|
||||
virStoragePoolTypeToString;
|
||||
|
Loading…
Reference in New Issue
Block a user