summaryrefslogtreecommitdiffstats
path: root/hw/input/virtio-input.c
diff options
context:
space:
mode:
authorPeter Maydell2019-11-25 16:47:44 +0100
committerPeter Maydell2019-11-25 16:47:44 +0100
commit65e05c82bdc6d348155e301c9d87dba7a08a5701 (patch)
tree99e413c0c6bfbffbec5ac7392c3652c625f3f0f0 /hw/input/virtio-input.c
parentMerge remote-tracking branch 'remotes/armbru/tags/pull-misc-2019-11-25' into ... (diff)
parentintel_iommu: TM field should not be in reserved bits (diff)
downloadqemu-65e05c82bdc6d348155e301c9d87dba7a08a5701.tar.gz
qemu-65e05c82bdc6d348155e301c9d87dba7a08a5701.tar.xz
qemu-65e05c82bdc6d348155e301c9d87dba7a08a5701.zip
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
virtio, pc: fixes More small bugfixes. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Mon 25 Nov 2019 08:43:07 GMT # gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469 # gpg: issuer "mst@redhat.com" # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full] # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [full] # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * remotes/mst/tags/for_upstream: intel_iommu: TM field should not be in reserved bits intel_iommu: refine SL-PEs reserved fields checking virtio-input: fix memory leak on unrealize Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/input/virtio-input.c')
-rw-r--r--hw/input/virtio-input.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/input/virtio-input.c b/hw/input/virtio-input.c
index 51617a5885..ec54e46ad6 100644
--- a/hw/input/virtio-input.c
+++ b/hw/input/virtio-input.c
@@ -275,6 +275,7 @@ static void virtio_input_finalize(Object *obj)
g_free(vinput->queue);
}
+
static void virtio_input_device_unrealize(DeviceState *dev, Error **errp)
{
VirtIOInputClass *vic = VIRTIO_INPUT_GET_CLASS(dev);
@@ -288,6 +289,8 @@ static void virtio_input_device_unrealize(DeviceState *dev, Error **errp)
return;
}
}
+ virtio_del_queue(vdev, 0);
+ virtio_del_queue(vdev, 1);
virtio_cleanup(vdev);
}