mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
conf: snapshot: Provide a function to free virDomainSnapshotDiskDefPtr
Tests will need to parse such a definition so it also needs to be freed. Provide a function for it. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
3b8135b03e
commit
50e1e053a5
@ -99,6 +99,17 @@ virDomainSnapshotDiskDefClear(virDomainSnapshotDiskDefPtr disk)
|
|||||||
disk->src = NULL;
|
disk->src = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
virDomainSnapshotDiskDefFree(virDomainSnapshotDiskDefPtr disk)
|
||||||
|
{
|
||||||
|
if (!disk)
|
||||||
|
return;
|
||||||
|
|
||||||
|
virDomainSnapshotDiskDefClear(disk);
|
||||||
|
VIR_FREE(disk);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Allocate a new virDomainSnapshotDef; free with virObjectUnref() */
|
/* Allocate a new virDomainSnapshotDef; free with virObjectUnref() */
|
||||||
virDomainSnapshotDefPtr
|
virDomainSnapshotDefPtr
|
||||||
virDomainSnapshotDefNew(void)
|
virDomainSnapshotDefNew(void)
|
||||||
|
@ -30,3 +30,6 @@ virDomainSnapshotDiskDefParseXML(xmlNodePtr node,
|
|||||||
virDomainSnapshotDiskDefPtr def,
|
virDomainSnapshotDiskDefPtr def,
|
||||||
unsigned int flags,
|
unsigned int flags,
|
||||||
virDomainXMLOptionPtr xmlopt);
|
virDomainXMLOptionPtr xmlopt);
|
||||||
|
|
||||||
|
void
|
||||||
|
virDomainSnapshotDiskDefFree(virDomainSnapshotDiskDefPtr disk);
|
||||||
|
Loading…
Reference in New Issue
Block a user