diff mbox series

mpt3sas: fix a memory leak

Message ID 20230207152159.18627-1-thenzl@redhat.com
State New
Headers show
Series mpt3sas: fix a memory leak | expand

Commit Message

Tomas Henzl Feb. 7, 2023, 3:21 p.m. UTC
Add a forgotten kfree

Fixes: dbec4c9040ed ("scsi: mpt3sas: lockless command submission")
Signed-off-by: Tomas Henzl <thenzl@redhat.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Martin K. Petersen Feb. 14, 2023, 4:57 p.m. UTC | #1
On Tue, 07 Feb 2023 16:21:59 +0100, Tomas Henzl wrote:

> Add a forgotten kfree
> 
> 

Applied to 6.3/scsi-queue, thanks!

[1/1] mpt3sas: fix a memory leak
      https://git.kernel.org/mkp/scsi/c/54dd96015e8d
diff mbox series

Patch

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 4e981ccaac41..f4083ff74895 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -5850,6 +5850,9 @@  _base_release_memory_pools(struct MPT3SAS_ADAPTER *ioc)
 		}
 		dma_pool_destroy(ioc->pcie_sgl_dma_pool);
 	}
+	kfree(ioc->pcie_sg_lookup);
+	ioc->pcie_sg_lookup = NULL;
+
 	if (ioc->config_page) {
 		dexitprintk(ioc,
 			    ioc_info(ioc, "config_page(0x%p): free\n",