mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-29 05:13:54 -06:00
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
14015304b6
commit
7267c0947d
357 changed files with 1672 additions and 1674 deletions
6
hw/sd.c
6
hw/sd.c
|
@ -409,9 +409,9 @@ static void sd_reset(SDState *sd, BlockDriverState *bdrv)
|
|||
sd->bdrv = bdrv;
|
||||
|
||||
if (sd->wp_groups)
|
||||
qemu_free(sd->wp_groups);
|
||||
g_free(sd->wp_groups);
|
||||
sd->wp_switch = bdrv ? bdrv_is_read_only(bdrv) : 0;
|
||||
sd->wp_groups = (int *) qemu_mallocz(sizeof(int) * sect);
|
||||
sd->wp_groups = (int *) g_malloc0(sizeof(int) * sect);
|
||||
memset(sd->function_group, 0, sizeof(int) * 6);
|
||||
sd->erase_start = 0;
|
||||
sd->erase_end = 0;
|
||||
|
@ -443,7 +443,7 @@ SDState *sd_init(BlockDriverState *bs, int is_spi)
|
|||
{
|
||||
SDState *sd;
|
||||
|
||||
sd = (SDState *) qemu_mallocz(sizeof(SDState));
|
||||
sd = (SDState *) g_malloc0(sizeof(SDState));
|
||||
sd->buf = qemu_blockalign(bs, 512);
|
||||
sd->spi = is_spi;
|
||||
sd->enable = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue