diff options
author | Stefan Weil <sw@weilnetz.de> | 2012-01-21 13:54:24 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-01-26 14:49:18 +0100 |
commit | 641543b76b82a8b361482b727e08de0c8ec093b0 (patch) | |
tree | 37bbd0327a9d2d3ca4e4f163e87cccf246f835b4 /block.c | |
parent | 81b6b9faef111f4493addc2ed19903feace332bf (diff) |
block/vdi: Zero unused parts when allocating a new block (fix #919242)
The new block was filled with zero when it was allocated by g_malloc0,
but when it was reused later and only partially used, data from the
previously allocated block were still present and written to the new
block.
This caused the problems reported by bug #919242
(https://bugs.launchpad.net/qemu/+bug/919242).
Now the unused parts of the new block which are before and after the data
are always filled with zero, so it is no longer necessary to zero the whole
block with g_malloc0.
I also updated the copyright comment.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
0 files changed, 0 insertions, 0 deletions