Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
virtio-blk: Fix potential nullpointer read access in virtio_blk_data_…
…plane_destroy

Fixes: CID 1532828
Fixes: b6948ab ("virtio-blk: add iothread-vq-mapping parameter")
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
Stefan Weil via authored and Michael Tokarev committed Dec 25, 2023
1 parent 9d5b42b commit d819fc9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hw/block/dataplane/virtio-blk.c
Expand Up @@ -152,14 +152,15 @@ bool virtio_blk_data_plane_create(VirtIODevice *vdev, VirtIOBlkConf *conf,
void virtio_blk_data_plane_destroy(VirtIOBlockDataPlane *s)
{
VirtIOBlock *vblk;
VirtIOBlkConf *conf = s->conf;
VirtIOBlkConf *conf;

if (!s) {
return;
}

vblk = VIRTIO_BLK(s->vdev);
assert(!vblk->dataplane_started);
conf = s->conf;

if (conf->iothread_vq_mapping_list) {
IOThreadVirtQueueMappingList *node;
Expand Down

0 comments on commit d819fc9

Please sign in to comment.