diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2015-04-08 10:11:51 -0400 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2015-04-08 10:11:51 -0400 |
commit | 5a0ff17741c1785b27229a16b5ab77470d71b170 (patch) | |
tree | 9dc54676f580c440444e92c65013896d1572c6be /drivers/vfio | |
parent | 6eb7018705de09b4138ca05d6a157203e0ea791a (diff) |
vfio-pci: Fix use after free
Reported by 0-day test infrastructure.
Fixes: ecaa1f6a0154 ("vfio-pci: Add VGA arbiter client")
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio')
-rw-r--r-- | drivers/vfio/pci/vfio_pci.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c index 049b9e9e0a41..69fab0fd15ae 100644 --- a/drivers/vfio/pci/vfio_pci.c +++ b/drivers/vfio/pci/vfio_pci.c | |||
@@ -953,6 +953,7 @@ static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
953 | if (ret) { | 953 | if (ret) { |
954 | iommu_group_put(group); | 954 | iommu_group_put(group); |
955 | kfree(vdev); | 955 | kfree(vdev); |
956 | return ret; | ||
956 | } | 957 | } |
957 | 958 | ||
958 | if (vfio_pci_is_vga(pdev)) { | 959 | if (vfio_pci_is_vga(pdev)) { |