[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v1 2/3] qcow2: fix the uninitialized bitmap_table va
From: |
Dima Stepanov |
Subject: |
[Qemu-devel] [PATCH v1 2/3] qcow2: fix the uninitialized bitmap_table variable |
Date: |
Sat, 9 Jun 2018 10:52:43 +0300 |
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 <address@hidden>
---
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