diff options
author | Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> | 2019-05-27 15:52:01 +0300 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2019-05-28 20:30:55 +0200 |
commit | 6388903e7cc9b6528934a083e81f086322c24c86 (patch) | |
tree | 36ce8b33f9ed24e47575215bc83a87ee72d55d89 /block | |
parent | c8bb23cbdbe32f5c326365e0a82e1b0e68cdcd8a (diff) | |
download | qemu-6388903e7cc9b6528934a083e81f086322c24c86.zip qemu-6388903e7cc9b6528934a083e81f086322c24c86.tar.gz qemu-6388903e7cc9b6528934a083e81f086322c24c86.tar.bz2 |
qcow2-bitmap: initialize bitmap directory alignment
Valgrind detects multiple issues in QEMU iotests when the memory is
used without being initialized. Valgrind may dump lots of unnecessary
reports what makes the memory issue analysis harder. Particularly,
that is true for the aligned bitmap directory and can be seen while
running the iotest #169. Padding the aligned space with zeros eases
the pain.
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Message-id: 1558961521-131620-1-git-send-email-andrey.shinkevich@virtuozzo.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/qcow2-bitmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c index 640da68..b248710 100644 --- a/block/qcow2-bitmap.c +++ b/block/qcow2-bitmap.c @@ -753,7 +753,7 @@ static int bitmap_list_store(BlockDriverState *bs, Qcow2BitmapList *bm_list, dir_offset = *offset; } - dir = g_try_malloc(dir_size); + dir = g_try_malloc0(dir_size); if (dir == NULL) { return -ENOMEM; } |