--- qemu/hw/ide/microdrive.c 2018/04/24 19:02:19 1.1.1.3 +++ qemu/hw/ide/microdrive.c 2018/04/24 19:30:28 1.1.1.4 @@ -26,7 +26,6 @@ #include #include #include "block.h" -#include "block_int.h" #include "dma.h" #include @@ -531,7 +530,7 @@ static int dscm1xxxx_detach(void *opaque PCMCIACardState *dscm1xxxx_init(DriveInfo *bdrv) { - MicroDriveState *md = (MicroDriveState *) qemu_mallocz(sizeof(MicroDriveState)); + MicroDriveState *md = (MicroDriveState *) g_malloc0(sizeof(MicroDriveState)); md->card.state = md; md->card.attach = dscm1xxxx_attach; md->card.detach = dscm1xxxx_detach; @@ -542,7 +541,7 @@ PCMCIACardState *dscm1xxxx_init(DriveInf qemu_allocate_irqs(md_set_irq, md, 1)[0]); md->bus.ifs[0].drive_kind = IDE_CFATA; md->bus.ifs[0].mdata_size = METADATA_SIZE; - md->bus.ifs[0].mdata_storage = (uint8_t *) qemu_mallocz(METADATA_SIZE); + md->bus.ifs[0].mdata_storage = (uint8_t *) g_malloc0(METADATA_SIZE); vmstate_register(NULL, -1, &vmstate_microdrive, md);