diff options
| author | Alberto Garcia <berto@igalia.com> | 2017-05-15 12:34:24 +0300 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2017-05-26 16:48:21 +0200 |
| commit | 525989a50a70ea0ffa2b1cdf56279765bb2b7de0 (patch) | |
| tree | 2953b1a906ada28bb85966eb767da63ed379750c | |
| parent | 9964e96dc9999cf7f7c936ee854a795415d19b60 (diff) | |
| download | focaccia-qemu-525989a50a70ea0ffa2b1cdf56279765bb2b7de0.tar.gz focaccia-qemu-525989a50a70ea0ffa2b1cdf56279765bb2b7de0.zip | |
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>
| -rw-r--r-- | block/stream.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/stream.c b/block/stream.c index 0113710845..52d329f5c6 100644 --- a/block/stream.c +++ b/block/stream.c @@ -280,6 +280,6 @@ void stream_start(const char *job_id, BlockDriverState *bs, fail: if (orig_bs_flags != bdrv_get_flags(bs)) { - bdrv_reopen(bs, s->bs_flags, NULL); + bdrv_reopen(bs, orig_bs_flags, NULL); } } |