diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index e5f78769571086cf033774c4b6c432e21b54ca10..e8b9df9306b1277173685e756a4876254a6f4fae 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -1647,7 +1647,7 @@ static int check_refblocks(BlockDriverState *bs, BdrvCheckResult *res, *nb_clusters); memset(&(*refcount_table)[old_nb_clusters], 0, (*nb_clusters - old_nb_clusters) * - sizeof(uint16_t)); + sizeof(**refcount_table)); } (*refcount_table)[cluster]--; inc_refcounts(bs, res, *refcount_table, *nb_clusters,