From e363e0143615a67f19d56e6b223b55df3bd9f580 Mon Sep 17 00:00:00 2001 From: "Stephen M. Cameron" Date: Tue, 3 May 2011 14:53:21 -0500 Subject: [PATCH] cciss: fix reply pool and block fetch table memory leaks Signed-off-by: Jens Axboe --- drivers/block/cciss.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 63fe05af2c5d..d60448941d53 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -4988,6 +4988,10 @@ static void __devexit cciss_remove_one(struct pci_dev *pdev) kfree(h->scatter_list[j]); kfree(h->scatter_list); cciss_free_sg_chain_blocks(h->cmd_sg_list, h->nr_cmds); + kfree(h->blockFetchTable); + if (h->reply_pool) + pci_free_consistent(h->pdev, h->max_commands * sizeof(__u64), + h->reply_pool, h->reply_pool_dhandle); /* * Deliberately omit pci_disable_device(): it does something nasty to * Smart Array controllers that pci_enable_device does not undo -- GitLab