diff options
author | leixiang <leixiang@kylinos.cn> | 2022-12-27 16:16:04 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-01-08 01:54:23 -0500 |
commit | 4396d4bd74ade31f4de9357dca3d87409280c4ac (patch) | |
tree | 3491f486e752792b62eae1e7e4cb30e22c5d0c89 /hw | |
parent | e66f2311d680de28e1cd95570822c4e17841120d (diff) |
virtio-pci: fix proxy->vector_irqfd leak in virtio_pci_set_guest_notifiers
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>
Message-Id: <20221227081604.806415-1-leixiang@kylinos.cn>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/virtio/virtio-pci.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |