block/export: consolidate request structs into VuBlockReq
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 24 Sep 2020 15:15:41 +0000 (16:15 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 23 Oct 2020 12:42:16 +0000 (13:42 +0100)
commitdf6af7ce77447be89e0d054dc06fb496ec4e69b4
tree9ae4798537b16ec3fa5458b8ecff436819bae068
parentdad4f19431653abf2a576ed062f8de4223eb228b
block/export: consolidate request structs into VuBlockReq

Only one struct is needed per request. Drop req_data and the separate
VuBlockReq instance. Instead let vu_queue_pop() allocate everything at
once.

This fixes the req_data memory leak in vu_block_virtio_process_req().

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20200924151549.913737-6-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/export/vhost-user-blk-server.c