From 845f85fa1597c72609bd10a37b9586b445c13d49 Mon Sep 17 00:00:00 2001 From: Amit Shah Date: Wed, 27 Jul 2011 14:00:32 +0530 Subject: 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 Signed-off-by: Michael S. Tsirkin --- hw/virtio.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw') diff --git a/hw/virtio.c b/hw/virtio.c index a8f4940..93dfb1e 100644 --- a/hw/virtio.c +++ b/hw/virtio.c @@ -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) -- cgit v1.1