diff options
Diffstat (limited to 'block/bochs.c')
-rw-r--r-- | block/bochs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bochs.c b/block/bochs.c index 6674b27438..199ac2b9af 100644 --- a/block/bochs.c +++ b/block/bochs.c @@ -131,7 +131,7 @@ static int bochs_open(BlockDriverState *bs, QDict *options, int flags, return -EFBIG; } - s->catalog_bitmap = g_try_malloc(s->catalog_size * 4); + s->catalog_bitmap = g_try_new(uint32_t, s->catalog_size); if (s->catalog_size && s->catalog_bitmap == NULL) { error_setg(errp, "Could not allocate memory for catalog"); return -ENOMEM; |