From 855d7e259fe2a804f08698ca5c97d6b07fa79da1 Mon Sep 17 00:00:00 2001 From: Amit Shah Date: Wed, 27 Jul 2011 13:50:41 +0530 Subject: virtio-balloon: Add exit handler, fix memleaks Add an exit handler that will free up RAM after a virtio-balloon device is unplugged. Signed-off-by: Amit Shah Reviewed-by: Markus Armbruster Acked-by: Michael S. Tsirkin --- hw/virtio-balloon.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hw/virtio-balloon.c') diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c index 26ee36472b..0ce00495e2 100644 --- a/hw/virtio-balloon.c +++ b/hw/virtio-balloon.c @@ -297,3 +297,8 @@ VirtIODevice *virtio_balloon_init(DeviceState *dev) return &s->vdev; } + +void virtio_balloon_exit(VirtIODevice *vdev) +{ + virtio_cleanup(vdev); +} -- cgit v1.2.3