Skip to content

Commit ea7a5c7

Browse files
Kamalheibjgunthorpe
authored andcommitted
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: 29c8d9e ("IB: Add vmw_pvrdma driver") Signed-off-by: Kamal Heib <[email protected]> Acked-by: Adit Ranadive <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 1abe186 commit ea7a5c7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,6 +1131,8 @@ static void pvrdma_pci_remove(struct pci_dev *pdev)
11311131
pvrdma_page_dir_cleanup(dev, &dev->cq_pdir);
11321132
pvrdma_page_dir_cleanup(dev, &dev->async_pdir);
11331133
pvrdma_free_slots(dev);
1134+
dma_free_coherent(&pdev->dev, sizeof(*dev->dsr), dev->dsr,
1135+
dev->dsrbase);
11341136

11351137
iounmap(dev->regs);
11361138
kfree(dev->sgid_tbl);

0 commit comments

Comments
 (0)