[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RESEND PATCH] virtio-pci: fix proxy->vector_irqfd leak in virtio_pci_se
From: |
leixiang |
Subject: |
[RESEND PATCH] virtio-pci: fix proxy->vector_irqfd leak in virtio_pci_set_guest_notifiers |
Date: |
Tue, 27 Dec 2022 16:16:04 +0800 |
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 <leixiang@kylinos.cn>
Tested-by: Zeng Chi <zengchi@kylinos.cn>
Suggested-by: Xie Ming <xieming@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