aboutsummaryrefslogtreecommitdiff
path: root/qemu-coroutine-lock.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-06-30 19:03:37 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2014-07-01 10:15:34 +0200
commit6764579f894950afe87d8ec3b323adde8925d4fd (patch)
treebfa56bfa82c72c4fd5252f4950f578117835e3e6 /qemu-coroutine-lock.c
parent4caf0fcd45db46920a6264b1621ae6adc772ef19 (diff)
block/cow: Avoid use of uninitialized cow_bs in error path
Commit 25814e8987 introduced an error-exit code path which does a "goto exit" before the cow_bs variable is initialized, meaning we would call bdrv_unref() on an uninitialized variable and likely segfault. Fix this by moving the NULL-initialization to the top of the function and making the exit code path handle the case where it is NULL. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'qemu-coroutine-lock.c')
0 files changed, 0 insertions, 0 deletions