diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-02-05 22:05:53 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-02-05 22:05:53 +0000 |
commit | 3ec88e80365c889f824d9a171fbf197b46a7c03f (patch) | |
tree | f0746a9234070ab3b86fd953827300eb21a0f7bb /block-dmg.c | |
parent | 8a1d02aba9f986ca03d854184cd432ee98bcd179 (diff) | |
download | qemu-3ec88e80365c889f824d9a171fbf197b46a7c03f.tar.gz qemu-3ec88e80365c889f824d9a171fbf197b46a7c03f.tar.bz2 qemu-3ec88e80365c889f824d9a171fbf197b46a7c03f.zip |
block: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6527 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block-dmg.c')
-rw-r--r-- | block-dmg.c | 6 |
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; |