The free_bitmap_clusters() routine is using the bitmap_table_load() call
to initialize the local bitmap_table variable. bitmap_table_load()
doesn't initialize variable to NULL in case of error. As a result a
following assert will be hit:
  assert(bitmap_table == NULL);

Remove this assert, since the next instruction is return from routine.

Signed-off-by: Dima Stepanov <dimas...@yandex-team.ru>
---
 block/qcow2-bitmap.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c
index 60d5290..69485aa 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;
     }
 
-- 
2.7.4


Reply via email to