mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +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;
|
||||
}
|
||||
|
||||
void
|
||||
virDomainSnapshotDiskDefFree(virDomainSnapshotDiskDefPtr disk)
|
||||
{
|
||||
if (!disk)
|
||||
return;
|
||||
|
||||
virDomainSnapshotDiskDefClear(disk);
|
||||
VIR_FREE(disk);
|
||||
}
|
||||
|
||||
|
||||
/* Allocate a new virDomainSnapshotDef; free with virObjectUnref() */
|
||||
virDomainSnapshotDefPtr
|
||||
virDomainSnapshotDefNew(void)
|
||||
|
@ -30,3 +30,6 @@ virDomainSnapshotDiskDefParseXML(xmlNodePtr node,
|
||||
virDomainSnapshotDiskDefPtr def,
|
||||
unsigned int flags,
|
||||
virDomainXMLOptionPtr xmlopt);
|
||||
|
||||
void
|
||||
virDomainSnapshotDiskDefFree(virDomainSnapshotDiskDefPtr disk);
|
||||
|
Loading…
Reference in New Issue
Block a user