[PATCH 03/13] qemu: firmware: Store machine types as a NULL-terminated string list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_firmware.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c
index 17380b7573..529ab8d68e 100644
--- a/src/qemu/qemu_firmware.c
+++ b/src/qemu/qemu_firmware.c
@@ -239,7 +239,7 @@ qemuFirmwareTargetFree(qemuFirmwareTarget *target)
     if (!target)
         return;

-    virStringListFreeCount(target->machines, target->nmachines);
+    g_strfreev(target->machines);

     g_free(target);
 }
@@ -534,7 +534,7 @@ qemuFirmwareTargetParse(const char *path,

         nmachines = virJSONValueArraySize(machines);

-        t->machines = g_new0(char *, nmachines);
+        t->machines = g_new0(char *, nmachines + 1);

         for (j = 0; j < nmachines; j++) {
             virJSONValue *machine = virJSONValueArrayGet(machines, j);
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux