qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] misc: edu: free dma timer in device unit


From: Li Qiang
Subject: Re: [Qemu-devel] [PATCH] misc: edu: free dma timer in device unit
Date: Wed, 8 Feb 2017 14:58:40 +0800

2017-02-08 14:53 GMT+08:00 Jiri Slaby <address@hidden>:

> On 02/08/2017, 04:40 AM, Li Qiang wrote:
> > From: Li Qiang <address@hidden>
> >
> > This can avoid a memory leak when hotplug and unplug.
> >
> > Signed-off-by: Li Qiang <address@hidden>
> > ---
> >  hw/misc/edu.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/hw/misc/edu.c b/hw/misc/edu.c
> > index 401039c..7565552 100644
> > --- a/hw/misc/edu.c
> > +++ b/hw/misc/edu.c
> > @@ -375,6 +375,7 @@ static void pci_edu_uninit(PCIDevice *pdev)
> >      qemu_mutex_destroy(&edu->thr_mutex);
> >
> >      timer_del(&edu->dma_timer);
> > +    timer_free(&edu->dma_timer);
>
> Freeing a static timer does not sound correct to me?
>
>
Sorry, as there is a few example that doesn't free timer, I don't notice
this is a static timer.


> thanks,
> --
> js
> suse labs
>


reply via email to

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