aboutsummaryrefslogtreecommitdiff
path: root/block-dmg.c
diff options
context:
space:
mode:
Diffstat (limited to 'block-dmg.c')
-rw-r--r--block-dmg.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/block-dmg.c b/block-dmg.c
index 4320c5dcb3..74454c7c54 100644
--- a/block-dmg.c
+++ b/block-dmg.c
@@ -159,10 +159,8 @@ dmg_close:
}
/* initialize zlib engine */
- if(!(s->compressed_chunk = malloc(max_compressed_size+1)))
- goto dmg_close;
- if(!(s->uncompressed_chunk = malloc(512*max_sectors_per_chunk)))
- goto dmg_close;
+ s->compressed_chunk = qemu_malloc(max_compressed_size+1);
+ s->uncompressed_chunk = qemu_malloc(512*max_sectors_per_chunk);
if(inflateInit(&s->zstream) != Z_OK)
goto dmg_close;