From 8cced121436a3298e5866dbfaec91cd475ad59cf Mon Sep 17 00:00:00 2001 From: "Gonglei (Arei)" Date: Mon, 28 Jul 2014 06:03:45 +0000 Subject: xen_disk: fix possible null-ptr dereference Signed-off-by: Gonglei Signed-off-by: Stefan Hajnoczi --- hw/block/xen_disk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c index aed5b5b3e9..a221d0bfca 100644 --- a/hw/block/xen_disk.c +++ b/hw/block/xen_disk.c @@ -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++; -- cgit v1.2.1