[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 28/37] virtio-input: free config list
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH 28/37] virtio-input: free config list |
Date: |
Fri, 22 Jul 2016 04:20:12 -0400 (EDT) |
Hi
----- Original Message -----
> > --- a/hw/input/virtio-input-hid.c
> > +++ b/hw/input/virtio-input-hid.c
>
> > + .instance_finalize = virtio_input_finalize,
>
> > --- a/hw/input/virtio-input.c
> > +++ b/hw/input/virtio-input.c
>
> > +void virtio_input_finalize(Object *obj)
> > +{
> > + VirtIOInput *vinput = VIRTIO_INPUT(obj);
> > + VirtIOInputConfig *cfg, *next;
> > +
> > + QTAILQ_FOREACH_SAFE(cfg, &vinput->cfg_list, node, next) {
> > + QTAILQ_REMOVE(&vinput->cfg_list, cfg, node);
> > + g_free(cfg);
> > + }
> > +}
>
> I think you can keep this local to virtio-input.c and simply hook it
> into the abstract base class (TYPE_VIRTIO_INPUT).
>
Yes, not sure why I didn't do that in the first, place. fixed.
- Re: [Qemu-devel] [PATCH 24/37] pc: keep gsi reference, (continued)
- [Qemu-devel] [PATCH 27/37] qjson: free str, marcandre . lureau, 2016/07/19
- [Qemu-devel] [PATCH 28/37] virtio-input: free config list, marcandre . lureau, 2016/07/19
- [Qemu-devel] [PATCH 29/37] ipmi: free extern timer, marcandre . lureau, 2016/07/19
- [Qemu-devel] [PATCH 30/37] usb: free USBDevice.strings, marcandre . lureau, 2016/07/19
- [Qemu-devel] [PATCH 31/37] tests: free a bunch of qmp responses, marcandre . lureau, 2016/07/19
- [Qemu-devel] [PATCH 32/37] usb: free leaking path, marcandre . lureau, 2016/07/19
- [Qemu-devel] [PATCH 33/37] bus: simplify name handling, marcandre . lureau, 2016/07/19