diff options
author | 2024-06-27 22:37:50 +0900 | |
---|---|---|
committer | 2024-07-01 17:16:05 -0400 | |
commit | 25b8a0f40c7f408442c5fd4da195fce9997cfb78 (patch) | |
tree | 8a7e256780600d62679df0e7589a7f09f7137ffe /hw | |
parent | i386/apic: Add hint on boot failure because of disabling x2APIC (diff) | |
download | qemu-25b8a0f40c7f408442c5fd4da195fce9997cfb78.tar.xz qemu-25b8a0f40c7f408442c5fd4da195fce9997cfb78.zip |
hw/virtio: Free vqs after vhost_dev_cleanup()
This fixes LeakSanitizer warnings.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20240627-san-v2-7-750bb0946dbd@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/virtio/vhost-user-base.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/virtio/vhost-user-base.c b/hw/virtio/vhost-user-base.c index 11e72b1e3b..2bc3423326 100644 --- a/hw/virtio/vhost-user-base.c +++ b/hw/virtio/vhost-user-base.c @@ -223,6 +223,7 @@ static void vub_disconnect(DeviceState *dev) { VirtIODevice *vdev = VIRTIO_DEVICE(dev); VHostUserBase *vub = VHOST_USER_BASE(vdev); + struct vhost_virtqueue *vhost_vqs = vub->vhost_dev.vqs; if (!vub->connected) { goto done; @@ -231,6 +232,7 @@ static void vub_disconnect(DeviceState *dev) vub_stop(vdev); vhost_dev_cleanup(&vub->vhost_dev); + g_free(vhost_vqs); done: /* Re-instate the event handler for new connections */ |