In v6.4.0-72-g3dda889a44 I've introduced parsing and formatting
of new sysinfo type 'fwcfg'. However, I've forgot to introduce
code that would free parsed data.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/util/virsysinfo.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c
index 52e576f129..db84339bda 100644
--- a/src/util/virsysinfo.c
+++ b/src/util/virsysinfo.c
@@ -131,6 +131,19 @@ void virSysinfoOEMStringsDefFree(virSysinfoOEMStringsDefPtr def)
VIR_FREE(def);
}
+
+static void
+virSysinfoFWCfgDefClear(virSysinfoFWCfgDefPtr def)
+{
+ if (!def)
+ return;
+
+ VIR_FREE(def->name);
+ VIR_FREE(def->value);
+ VIR_FREE(def->file);
+}
+
+
/**
* virSysinfoDefFree:
* @def: a sysinfo structure
@@ -184,6 +197,10 @@ void virSysinfoDefFree(virSysinfoDefPtr def)
virSysinfoOEMStringsDefFree(def->oemStrings);
+ for (i = 0; i < def->nfw_cfgs; i++)
+ virSysinfoFWCfgDefClear(&def->fw_cfgs[i]);
+ VIR_FREE(def->fw_cfgs);
+
VIR_FREE(def);
}
--
2.26.2