]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - softmmu/bootdevice.c
Use g_new() & friends where that makes obvious sense
[thirdparty/qemu.git] / softmmu / bootdevice.c
index add4e3d2d1297f0f27c32643f364c1c6dd7ea7e7..c0713bfa9fa3a161b7857c31305021686994e617 100644 (file)
@@ -166,7 +166,7 @@ void add_boot_device_path(int32_t bootindex, DeviceState *dev,
 
     del_boot_device_path(dev, suffix);
 
-    node = g_malloc0(sizeof(FWBootEntry));
+    node = g_new0(FWBootEntry, 1);
     node->bootindex = bootindex;
     node->suffix = g_strdup(suffix);
     node->dev = dev;
@@ -367,7 +367,7 @@ void add_boot_device_lchs(DeviceState *dev, const char *suffix,
 
     assert(dev != NULL || suffix != NULL);
 
-    node = g_malloc0(sizeof(FWLCHSEntry));
+    node = g_new0(FWLCHSEntry, 1);
     node->suffix = g_strdup(suffix);
     node->dev = dev;
     node->lcyls = lcyls;