summaryrefslogtreecommitdiff
path: root/softmmu/bootdevice.c
diff options
context:
space:
mode:
Diffstat (limited to 'softmmu/bootdevice.c')
-rw-r--r--softmmu/bootdevice.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/softmmu/bootdevice.c b/softmmu/bootdevice.c
index add4e3d2d1..c0713bfa9f 100644
--- a/softmmu/bootdevice.c
+++ b/softmmu/bootdevice.c
@@ -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;