diff options
author | Amit Shah <amit.shah@redhat.com> | 2011-07-27 13:50:41 +0530 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-04 16:43:10 -0500 |
commit | 855d7e259fe2a804f08698ca5c97d6b07fa79da1 (patch) | |
tree | 5cb9ed7119f6c4413995ccce2eac9e0d3e65d091 /hw/virtio-balloon.c | |
parent | 514e73ecebc0aeadef218e91e36ee42b3d145c93 (diff) |
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 <amit.shah@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio-balloon.c')
-rw-r--r-- | hw/virtio-balloon.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); +} |