From 7eb24009dbf8102fc27d5459bec1cb8a932540c4 Mon Sep 17 00:00:00 2001 From: Vladimir Sementsov-Ogievskiy Date: Fri, 8 Jun 2018 13:12:25 +0300 Subject: block/qcow2-bitmap: fix free_bitmap_clusters This assert may fail, because bitmap_table is not initialized. Just drop it, as it's obvious, that bitmap_table_load sets bitmap_table parameter only when returning zero. Reported-by: Pavel Butsykin Signed-off-by: Vladimir Sementsov-Ogievskiy Message-id: 20180608101225.2575-1-vsementsov@virtuozzo.com Signed-off-by: Max Reitz --- block/qcow2-bitmap.c | 1 - 1 file changed, 1 deletion(-) (limited to 'block') diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c index 60d5290f10..69485aa1de 100644 --- a/block/qcow2-bitmap.c +++ b/block/qcow2-bitmap.c @@ -254,7 +254,6 @@ static int free_bitmap_clusters(BlockDriverState *bs, Qcow2BitmapTable *tb) ret = bitmap_table_load(bs, tb, &bitmap_table); if (ret < 0) { - assert(bitmap_table == NULL); return ret; } -- cgit v1.2.3