[Qemu-devel] [PATCH 6/7] vfio: platform: free timer in error path

Li Qiang posted 7 patches 7 years, 3 months ago
[Qemu-devel] [PATCH 6/7] vfio: platform: free timer in error path
Posted by Li Qiang 7 years, 3 months ago
Signed-off-by: Li Qiang <liq3ea@gmail.com>
---
 hw/vfio/platform.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
index 6a4fd7b..ba19143 100644
--- a/hw/vfio/platform.c
+++ b/hw/vfio/platform.c
@@ -518,6 +518,7 @@ static int vfio_populate_device(VFIODevice *vbasedev, Error **errp)
     return 0;
 irq_err:
     timer_del(vdev->mmap_timer);
+    timer_free(vdev->mmap_timer);
     QLIST_FOREACH_SAFE(intp, &vdev->intp_list, next, tmp) {
         QLIST_REMOVE(intp, next);
         g_free(intp);
-- 
1.8.3.1