From: Yunlei Ding <yunlei.d...@citrix.com>

s->rq should be set with req instead of req-next.

Signed-off-by: Yunlei Ding <yunlei.d...@citrix.com>
Coverity-ID: 1055910
Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com>
---
 hw/virtio-blk.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index fcf893a..f3a81e3 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -288,7 +288,7 @@ static int virtio_blk_load(QEMUFile *f, void *opaque, int 
version_id)
         VirtIOBlockReq *req = virtio_blk_alloc_request(s);
         qemu_get_buffer(f, (unsigned char*)&req->elem, sizeof(req->elem));
         req->next = s->rq;
-        s->rq = req->next;
+        s->rq = req;
     }
 
     return 0;
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to