From ea69d5b7e4b59362f9d42b4e7e40f5c2fcc7b31b Mon Sep 17 00:00:00 2001 From: John Snow Date: Wed, 18 Jul 2018 22:54:44 +0200 Subject: [PATCH 226/268] block/qcow2-bitmap: fix free_bitmap_clusters RH-Author: John Snow Message-id: <20180718225511.14878-9-jsnow@redhat.com> Patchwork-id: 81392 O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 08/35] block/qcow2-bitmap: fix free_bitmap_clusters Bugzilla: 1207657 RH-Acked-by: Eric Blake RH-Acked-by: Stefan Hajnoczi RH-Acked-by: Fam Zheng From: Vladimir Sementsov-Ogievskiy 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 (cherry picked from commit 7eb24009dbf8102fc27d5459bec1cb8a932540c4) Signed-off-by: John Snow Signed-off-by: Miroslav Rezanina --- block/qcow2-bitmap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c index 6e93ec4..3e4e4e4 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; } -- 1.8.3.1