diff options
Diffstat (limited to 'block/rbd.c')
-rw-r--r-- | block/rbd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/rbd.c b/block/rbd.c index 3aaf8559dd..ea969e7beb 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -862,7 +862,7 @@ static int qemu_rbd_snap_list(BlockDriverState *bs, int max_snaps = RBD_MAX_SNAPS; do { - snaps = g_malloc(sizeof(*snaps) * max_snaps); + snaps = g_new(rbd_snap_info_t, max_snaps); snap_count = rbd_snap_list(s->image, snaps, &max_snaps); if (snap_count <= 0) { g_free(snaps); |