mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 12:09:58 +00:00
virtio: Plug memleak by freeing vdev
virtio_common_init() allocates RAM for the vdev struct (and any additional memory, depending on the size passed to the function). This memory wasn't being freed until now. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
b52dfd71f3
commit
845f85fa15
@ -834,6 +834,7 @@ void virtio_cleanup(VirtIODevice *vdev)
|
||||
if (vdev->config)
|
||||
qemu_free(vdev->config);
|
||||
qemu_free(vdev->vq);
|
||||
qemu_free(vdev);
|
||||
}
|
||||
|
||||
static void virtio_vmstate_change(void *opaque, int running, int reason)
|
||||
|
Loading…
Reference in New Issue
Block a user