提交 50e1e053 编写于 作者: P Peter Krempa

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: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 3b8135b0
......@@ -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);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册