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:
Gonglei (Arei) 2014-07-28 06:03:45 +00:00 committed by Kevin Wolf
parent 8efc936336
commit 8cced12143
1 changed files with 1 additions and 0 deletions

View File

@ -589,6 +589,7 @@ static int blk_send_response_one(struct ioreq *ioreq)
break;
default:
dst = NULL;
return 0;
}
memcpy(dst, &resp, sizeof(resp));
blkdev->rings.common.rsp_prod_pvt++;