qemu-devel
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]