mirror of https://gitlab.com/qemu-project/qemu
xen_disk: fix possible null-ptr dereference
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
8efc936336
commit
8cced12143
|
@ -589,6 +589,7 @@ static int blk_send_response_one(struct ioreq *ioreq)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
dst = NULL;
|
dst = NULL;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
memcpy(dst, &resp, sizeof(resp));
|
memcpy(dst, &resp, sizeof(resp));
|
||||||
blkdev->rings.common.rsp_prod_pvt++;
|
blkdev->rings.common.rsp_prod_pvt++;
|
||||||
|
|
Loading…
Reference in New Issue