]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - hw/misc/applesmc.c
Use g_new() & friends where that makes obvious sense
[thirdparty/qemu.git] / hw / misc / applesmc.c
index 1b9acaf1d38de119e8a88ae34d0d8d54addff0f1..81cd6b6423ffcd962a7f454b621ff2c4e0cd2d27 100644 (file)
@@ -253,7 +253,7 @@ static void applesmc_add_key(AppleSMCState *s, const char *key,
 {
     struct AppleSMCData *def;
 
-    def = g_malloc0(sizeof(struct AppleSMCData));
+    def = g_new0(struct AppleSMCData, 1);
     def->key = key;
     def->len = len;
     def->data = data;