[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: |
Jiri Slaby |
Subject: |
Re: [Qemu-devel] [PATCH] misc: edu: free dma timer in device unit |
Date: |
Wed, 8 Feb 2017 07:53:55 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
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?
thanks,
--
js
suse labs