]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - hw/nvme/ns.c
Use g_new() & friends where that makes obvious sense
[thirdparty/qemu.git] / hw / nvme / ns.c
index 8a3613d9ab0e87cf9d73466c8f045953515959f0..324f53ea0cd14256aa170ff96fbba807f49a9195 100644 (file)
@@ -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);