virDomainSnapshotDiskDefFree: Export and register as autoptr func

Allow using the function for creating temporary snapshot disk
definitions for creating <transient/> disk overlays.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Tested-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2020-09-21 16:49:26 +02:00
parent 0912f8e9af
commit 797ee40b21
2 changed files with 5 additions and 3 deletions

View File

@ -70,6 +70,11 @@ struct _virDomainSnapshotDiskDef {
virStorageSourcePtr src; virStorageSourcePtr src;
}; };
void
virDomainSnapshotDiskDefFree(virDomainSnapshotDiskDefPtr disk);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainSnapshotDiskDef, virDomainSnapshotDiskDefFree);
/* Stores the complete snapshot metadata */ /* Stores the complete snapshot metadata */
struct _virDomainSnapshotDef { struct _virDomainSnapshotDef {
virDomainMomentDef parent; virDomainMomentDef parent;

View File

@ -30,6 +30,3 @@ virDomainSnapshotDiskDefParseXML(xmlNodePtr node,
virDomainSnapshotDiskDefPtr def, virDomainSnapshotDiskDefPtr def,
unsigned int flags, unsigned int flags,
virDomainXMLOptionPtr xmlopt); virDomainXMLOptionPtr xmlopt);
void
virDomainSnapshotDiskDefFree(virDomainSnapshotDiskDefPtr disk);