qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] misc: edu: free dma timer in device unit
@ 2017-02-08  3:40 Li Qiang
  2017-02-08  6:53 ` Jiri Slaby
  0 siblings, 1 reply; 3+ messages in thread
From: Li Qiang @ 2017-02-08  3:40 UTC (permalink / raw)
  To: jslaby, qemu-devel, pbonzini; +Cc: Li Qiang

From: Li Qiang <liqiang6-s@360.cn>

This can avoid a memory leak when hotplug and unplug.

Signed-off-by: Li Qiang <liqiang6-s@360.cn>
---
 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);
 }
 
 static void edu_obj_uint64(Object *obj, Visitor *v, const char *name,
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-08  6:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-08  3:40 [Qemu-devel] [PATCH] misc: edu: free dma timer in device unit Li Qiang
2017-02-08  6:53 ` Jiri Slaby
2017-02-08  6:58   ` Li Qiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).