diff mbox series

[5/7] vfio: platform: cleanup the notifier in error path

Message ID 1539926412-21831-6-git-send-email-liq3ea@gmail.com
State New
Headers show
Series vfio: some trivial fixes | expand

Commit Message

Li Qiang Oct. 19, 2018, 5:20 a.m. UTC
Signed-off-by: Li Qiang <liq3ea@gmail.com>
---
 hw/vfio/platform.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
index 5992fe7..6a4fd7b 100644
--- a/hw/vfio/platform.c
+++ b/hw/vfio/platform.c
@@ -80,6 +80,7 @@  static VFIOINTp *vfio_init_intp(VFIODevice *vbasedev,
         intp->unmask = g_malloc0(sizeof(EventNotifier));
         ret = event_notifier_init(intp->unmask, 0);
         if (ret) {
+            event_notifier_cleanup(intp->interrupt);
             g_free(intp->interrupt);
             g_free(intp->unmask);
             g_free(intp);