aboutsummaryrefslogtreecommitdiff
path: root/block/vdi.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2021-07-08 13:47:04 +0200
committerKevin Wolf <kwolf@redhat.com>2021-07-09 13:19:11 +0200
commitbcfd86d6a6432be75fd8700c7c1aabb243adf469 (patch)
treec8c2aafd77c22ea17f8632a46715fcbec3517cd2 /block/vdi.c
parenta7cd44bef3d9380181734a93977c3d1df3eef2cf (diff)
qcow2: Fix dangling pointer after reopen for 'file'
Without an external data file, s->data_file is a second pointer with the same value as bs->file. When changing bs->file to a different BdrvChild and freeing the old BdrvChild, s->data_file must also be updated, otherwise it points to freed memory and causes crashes. This problem was caught by iotests case 245. Fixes: df2b7086f169239ebad5d150efa29c9bb6d4f820 Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20210708114709.206487-2-kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/vdi.c')
0 files changed, 0 insertions, 0 deletions