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 <leixi...@kylinos.cn> Tested-by: Zeng Chi <zeng...@kylinos.cn> Suggested-by: Xie Ming <xiem...@kylinos.cn> --- 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 a50c5a57d7..5339be4e01 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -1063,6 +1063,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; } -- 2.25.1