]> xenbits.xensource.com Git - libvirt.git/commitdiff
virfirmware: Expose and define autoptr for virFirmwareFree
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 5 Aug 2019 09:38:06 +0000 (11:38 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 12 Sep 2019 10:19:56 +0000 (12:19 +0200)
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@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
src/libvirt_private.syms
src/util/virfirmware.c
src/util/virfirmware.h

index 918f81470be69674cd851b533560a78240a63118..22f8a8267f6afe4a99ab603ea5dc8e72c5180783 100644 (file)
@@ -2040,6 +2040,7 @@ virFirewallDZoneExists;
 
 
 # util/virfirmware.h
+virFirmwareFree;
 virFirmwareFreeList;
 virFirmwareParse;
 virFirmwareParseList;
index f41e000447241f17b19bf14743ab94287fd7b9ee..b4747bd3460b3a7e2be40e6c0ff95bc110cbf6dc 100644 (file)
@@ -31,7 +31,7 @@
 VIR_LOG_INIT("util.firmware");
 
 
-static void
+void
 virFirmwareFree(virFirmwarePtr firmware)
 {
     if (!firmware)
index ed59f341026d89c81649961824938196e60458c4..30bcd21fa405042b0d8a36d4778e0ad80cd0142a 100644 (file)
@@ -31,6 +31,11 @@ struct _virFirmware {
 };
 
 
+void
+virFirmwareFree(virFirmwarePtr firmware);
+
+VIR_DEFINE_AUTOPTR_FUNC(virFirmware, virFirmwareFree);
+
 void
 virFirmwareFreeList(virFirmwarePtr *firmwares, size_t nfirmwares);