Revision 7267c094 hw/ide/microdrive.c
b/hw/ide/microdrive.c | ||
---|---|---|
531 | 531 |
|
532 | 532 |
PCMCIACardState *dscm1xxxx_init(DriveInfo *bdrv) |
533 | 533 |
{ |
534 |
MicroDriveState *md = (MicroDriveState *) qemu_mallocz(sizeof(MicroDriveState));
|
|
534 |
MicroDriveState *md = (MicroDriveState *) g_malloc0(sizeof(MicroDriveState));
|
|
535 | 535 |
md->card.state = md; |
536 | 536 |
md->card.attach = dscm1xxxx_attach; |
537 | 537 |
md->card.detach = dscm1xxxx_detach; |
... | ... | |
542 | 542 |
qemu_allocate_irqs(md_set_irq, md, 1)[0]); |
543 | 543 |
md->bus.ifs[0].drive_kind = IDE_CFATA; |
544 | 544 |
md->bus.ifs[0].mdata_size = METADATA_SIZE; |
545 |
md->bus.ifs[0].mdata_storage = (uint8_t *) qemu_mallocz(METADATA_SIZE);
|
|
545 |
md->bus.ifs[0].mdata_storage = (uint8_t *) g_malloc0(METADATA_SIZE);
|
|
546 | 546 |
|
547 | 547 |
vmstate_register(NULL, -1, &vmstate_microdrive, md); |
548 | 548 |
|
Also available in: Unified diff