]> 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)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 3 Aug 2017 19:33:26 +0000 (14:33 -0500)
commitc60a8ed89bcbccc48f4c9bd1088c0295019dec96
treee9d20c53d8e52b6840654b013f420c6ce543830f
parentc79bef68c46cfb04d856516dcc5f828842f2907b
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>
(cherry picked from commit 525989a50a70ea0ffa2b1cdf56279765bb2b7de0)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/stream.c