[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 28/37] virtio-input: free config list
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH 28/37] virtio-input: free config list |
Date: |
Fri, 22 Jul 2016 09:58:25 +0200 |
> --- 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).
Other than that it looks fine to me.
cheers,
Gerd
- Re: [Qemu-devel] [PATCH 24/37] pc: keep gsi reference, (continued)
[Qemu-devel] [PATCH 25/37] ahci: free irqs array, marcandre . lureau, 2016/07/19
[Qemu-devel] [PATCH 26/37] sd: free timer, marcandre . lureau, 2016/07/19
[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
- Re: [Qemu-devel] [PATCH 28/37] virtio-input: free config list,
Gerd Hoffmann <=
[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