From: leixiang <[email protected]> proxy->vector_irqfd did not free when kvm_virtio_pci_vector_use or msix_set_vector_notifiers failed in virtio_pci_set_guest_notifiers.
Fixes: 7d37d351 Signed-off-by: Lei Xiang <[email protected]> Tested-by: Zeng Chi <[email protected]> Suggested-by: Xie Ming <[email protected]> Message-Id: <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> --- hw/virtio/virtio-pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 7bc60fcf94..247325c193 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -1291,6 +1291,8 @@ assign_error: while (--n >= 0) { virtio_pci_set_guest_notifier(d, n, !assign, with_irqfd); } + g_free(proxy->vector_irqfd); + proxy->vector_irqfd = NULL; return r; } -- MST
