diff options
Diffstat (limited to 'block/qcow2-cache.c')
-rw-r--r-- | block/qcow2-cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c index 5353b44828..fe0615a995 100644 --- a/block/qcow2-cache.c +++ b/block/qcow2-cache.c @@ -50,7 +50,7 @@ Qcow2Cache *qcow2_cache_create(BlockDriverState *bs, int num_tables) c = g_malloc0(sizeof(*c)); c->size = num_tables; - c->entries = g_malloc0(sizeof(*c->entries) * num_tables); + c->entries = g_new0(Qcow2CachedTable, num_tables); for (i = 0; i < c->size; i++) { c->entries[i].table = qemu_try_blockalign(bs->file, s->cluster_size); |