ソースを参照

vfio-pci: Cleanup on INTx setup failure

Missing some unwind code.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Alex Williamson 13 年 前
コミット
ce59af2dba
1 ファイル変更2 行追加0 行削除
  1. 2 0
      hw/vfio_pci.c

+ 2 - 0
hw/vfio_pci.c

@@ -285,6 +285,8 @@ static int vfio_enable_intx(VFIODevice *vdev)
 
     if (ioctl(vdev->fd, VFIO_DEVICE_SET_IRQS, &irq_set_fd)) {
         error_report("vfio: Error: Failed to setup INTx fd: %m\n");
+        qemu_set_fd_handler(irq_set_fd.fd, NULL, NULL, vdev);
+        event_notifier_cleanup(&vdev->intx.interrupt);
         return -errno;
     }