aboutsummaryrefslogtreecommitdiff
path: root/hw/nvme/ns.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/nvme/ns.c')
-rw-r--r--hw/nvme/ns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/nvme/ns.c b/hw/nvme/ns.c
index 8a3613d9ab..324f53ea0c 100644
--- a/hw/nvme/ns.c
+++ b/hw/nvme/ns.c
@@ -268,7 +268,7 @@ static void nvme_ns_init_zoned(NvmeNamespace *ns)
nvme_ns_zoned_init_state(ns);
- id_ns_z = g_malloc0(sizeof(NvmeIdNsZoned));
+ id_ns_z = g_new0(NvmeIdNsZoned, 1);
/* MAR/MOR are zeroes-based, FFFFFFFFFh means no limit */
id_ns_z->mar = cpu_to_le32(ns->params.max_active_zones - 1);