]> git.proxmox.com Git - mirror_qemu.git/commit
stream: fix crash in stream_start() when block_job_create() fails
authorAlberto Garcia <berto@igalia.com>
Mon, 15 May 2017 09:34:24 +0000 (12:34 +0300)
committerKevin Wolf <kwolf@redhat.com>
Fri, 26 May 2017 14:48:21 +0000 (16:48 +0200)
commit525989a50a70ea0ffa2b1cdf56279765bb2b7de0
tree2953b1a906ada28bb85966eb767da63ed379750c
parent9964e96dc9999cf7f7c936ee854a795415d19b60
stream: fix crash in stream_start() when block_job_create() fails

The code that tries to reopen a BlockDriverState in stream_start()
when the creation of a new block job fails crashes because it attempts
to dereference a pointer that is known to be NULL.

This is a regression introduced in a170a91fd3eab6155da39e740381867e,
likely because the code was copied from stream_complete().

Cc: qemu-stable@nongnu.org
Reported-by: Kashyap Chamarthy <kchamart@redhat.com>
Signed-off-by: Alberto Garcia <berto@igalia.com>
Tested-by: Kashyap Chamarthy <kchamart@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/stream.c