summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKamal Heib <kamalheib1@gmail.com>2019-04-03 16:52:54 +0300
committerJason Gunthorpe <jgg@mellanox.com>2019-04-08 13:04:46 -0300
commitea7a5c706fa49273cf6d1d9def053ecb50db2076 (patch)
tree0d96dde77c136f34ad6dcf7f40ad578c4111947b /drivers
parent1abe186ed8a6593069bc122da55fc684383fdc1c (diff)
downloadlinux-ea7a5c706fa49273cf6d1d9def053ecb50db2076.tar.bz2
RDMA/vmw_pvrdma: Fix memory leak on pvrdma_pci_remove
Make sure to free the DSR on pvrdma_pci_remove() to avoid the memory leak. Fixes: 29c8d9eba550 ("IB: Add vmw_pvrdma driver") Signed-off-by: Kamal Heib <kamalheib1@gmail.com> Acked-by: Adit Ranadive <aditr@vmware.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
index 6d8b3e0de57a..ec41400fec0c 100644
--- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
+++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
@@ -1131,6 +1131,8 @@ static void pvrdma_pci_remove(struct pci_dev *pdev)
pvrdma_page_dir_cleanup(dev, &dev->cq_pdir);
pvrdma_page_dir_cleanup(dev, &dev->async_pdir);
pvrdma_free_slots(dev);
+ dma_free_coherent(&pdev->dev, sizeof(*dev->dsr), dev->dsr,
+ dev->dsrbase);
iounmap(dev->regs);
kfree(dev->sgid_tbl);