summaryrefslogtreecommitdiffstats
path: root/hw/vfio/platform.c
diff options
context:
space:
mode:
authorPeter Maydell2017-07-27 11:49:05 +0200
committerPeter Maydell2017-07-27 11:49:05 +0200
commit6be37cc583454ee27587a79b6008e22c3cc1a763 (patch)
tree8967f9d863ca9c0d3cc9fb0c9a9d781930bdc4de /hw/vfio/platform.c
parentMerge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into st... (diff)
parentvfio/pci: fix use of freed memory (diff)
downloadqemu-6be37cc583454ee27587a79b6008e22c3cc1a763.tar.gz
qemu-6be37cc583454ee27587a79b6008e22c3cc1a763.tar.xz
qemu-6be37cc583454ee27587a79b6008e22c3cc1a763.zip
Merge remote-tracking branch 'remotes/awilliam/tags/vfio-fixes-20170726.0' into staging
VFIO fixes 2017-07-26 - Error path use after free bug fixes (Philippe Mathieu-Daudé) # gpg: Signature made Wed 26 Jul 2017 18:49:00 BST # gpg: using RSA key 0x239B9B6E3BB08B22 # gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>" # gpg: aka "Alex Williamson <alex@shazbot.org>" # gpg: aka "Alex Williamson <alwillia@redhat.com>" # gpg: aka "Alex Williamson <alex.l.williamson@gmail.com>" # Primary key fingerprint: 42F6 C04E 540B D1A9 9E7B 8A90 239B 9B6E 3BB0 8B22 * remotes/awilliam/tags/vfio-fixes-20170726.0: vfio/pci: fix use of freed memory vfio/platform: fix use of freed memory Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/vfio/platform.c')
-rw-r--r--hw/vfio/platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
index 7c09deda61..da84abf4fc 100644
--- a/hw/vfio/platform.c
+++ b/hw/vfio/platform.c
@@ -120,11 +120,11 @@ static int vfio_set_trigger_eventfd(VFIOINTp *intp,
*pfd = event_notifier_get_fd(intp->interrupt);
qemu_set_fd_handler(*pfd, (IOHandler *)handler, NULL, intp);
ret = ioctl(vbasedev->fd, VFIO_DEVICE_SET_IRQS, irq_set);
- g_free(irq_set);
if (ret < 0) {
error_report("vfio: Failed to set trigger eventfd: %m");
qemu_set_fd_handler(*pfd, NULL, NULL, NULL);
}
+ g_free(irq_set);
return ret;
}