aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/vfio/platform.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
index 35266a813c..9382bb7f36 100644
--- a/hw/vfio/platform.c
+++ b/hw/vfio/platform.c
@@ -346,8 +346,7 @@ static int vfio_populate_device(VFIODevice *vbasedev)
return ret;
}
- vdev->regions = g_malloc0_n(vbasedev->num_regions,
- sizeof(VFIORegion *));
+ vdev->regions = g_new0(VFIORegion *, vbasedev->num_regions);
for (i = 0; i < vbasedev->num_regions; i++) {
struct vfio_region_info reg_info = { .argsz = sizeof(reg_info) };