提交 a0cf8363 编写于 作者: K Kevin Wolf

qcow2: Fix data file error condition in qcow2_co_create()

We were trying to check whether bdrv_open_blockdev_ref() returned
success, but accidentally checked the wrong variable. Spotted by
Coverity (CID 1399703).
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Reviewed-by: NStefano Garzarella <sgarzare@redhat.com>
上级 5e771752
......@@ -3073,7 +3073,7 @@ qcow2_co_create(BlockdevCreateOptions *create_options, Error **errp)
goto out;
}
data_bs = bdrv_open_blockdev_ref(qcow2_opts->data_file, errp);
if (bs == NULL) {
if (data_bs == NULL) {
ret = -EIO;
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册