This function frees a _virFirmware struct. So far, it doesn't
need to be called from outside of the module, but this will
change shortly. In the light of recent VIR_DEFINE_AUTOPTR_FUNC()
additions, do the same to virFirmwareFree().
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/libvirt_private.syms | 1 +
src/util/virfirmware.c | 2 +-
src/util/virfirmware.h | 5 +++++
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index c323f679b3..c66161496e 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2036,6 +2036,7 @@ virFirewallDZoneExists;
# util/virfirmware.h
+virFirmwareFree;
virFirmwareFreeList;
virFirmwareParse;
virFirmwareParseList;
diff --git a/src/util/virfirmware.c b/src/util/virfirmware.c
index f41e000447..b4747bd346 100644
--- a/src/util/virfirmware.c
+++ b/src/util/virfirmware.c
@@ -31,7 +31,7 @@
VIR_LOG_INIT("util.firmware");
-static void
+void
virFirmwareFree(virFirmwarePtr firmware)
{
if (!firmware)
diff --git a/src/util/virfirmware.h b/src/util/virfirmware.h
index ed59f34102..30bcd21fa4 100644
--- a/src/util/virfirmware.h
+++ b/src/util/virfirmware.h
@@ -31,6 +31,11 @@ struct _virFirmware {
};
+void
+virFirmwareFree(virFirmwarePtr firmware);
+
+VIR_DEFINE_AUTOPTR_FUNC(virFirmware, virFirmwareFree);
+
void
virFirmwareFreeList(virFirmwarePtr *firmwares, size_t nfirmwares);
--
2.21.0