Since the release of ->stat_vq_elem is now ensured by the vm state change handler, there's no need in the reset handler doing it.
Signed-off-by: Roman Kagan <rka...@virtuozzo.com> Cc: "Michael S. Tsirkin" <m...@redhat.com> Cc: Ladi Prosek <lpro...@redhat.com> Cc: Stefan Hajnoczi <stefa...@redhat.com> --- hw/virtio/virtio-balloon.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 056ae49..1557650 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -465,16 +465,6 @@ static void virtio_balloon_device_unrealize(DeviceState *dev, Error **errp) virtio_cleanup(vdev); } -static void virtio_balloon_device_reset(VirtIODevice *vdev) -{ - VirtIOBalloon *s = VIRTIO_BALLOON(vdev); - - if (s->stats_vq_elem != NULL) { - g_free(s->stats_vq_elem); - s->stats_vq_elem = NULL; - } -} - static void virtio_balloon_instance_init(Object *obj) { VirtIOBalloon *s = VIRTIO_BALLOON(obj); @@ -506,7 +496,6 @@ static void virtio_balloon_class_init(ObjectClass *klass, void *data) set_bit(DEVICE_CATEGORY_MISC, dc->categories); vdc->realize = virtio_balloon_device_realize; vdc->unrealize = virtio_balloon_device_unrealize; - vdc->reset = virtio_balloon_device_reset; vdc->get_config = virtio_balloon_get_config; vdc->set_config = virtio_balloon_set_config; vdc->get_features = virtio_balloon_get_features; -- 2.7.4