diff options
author | Tomas Henzl <thenzl@redhat.com> | 2023-02-07 16:21:59 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-10 09:33:20 +0100 |
commit | 847cdbdcd5a24c1eec9595161a23b88fef91ff42 (patch) | |
tree | ad877bd0f8c4f826f95d7a59dd5b535ba34963a8 | |
parent | 099bd0a7b363a17e6796896838708d957ef78463 (diff) | |
download | linux-stable-847cdbdcd5a24c1eec9595161a23b88fef91ff42.tar.gz linux-stable-847cdbdcd5a24c1eec9595161a23b88fef91ff42.tar.bz2 linux-stable-847cdbdcd5a24c1eec9595161a23b88fef91ff42.zip |
scsi: mpt3sas: Fix a memory leak
[ Upstream commit 54dd96015e8d7a2a07359e2dfebf05b529d1780c ]
Add a forgotten kfree().
Fixes: dbec4c9040ed ("scsi: mpt3sas: lockless command submission")
Link: https://lore.kernel.org/r/20230207152159.18627-1-thenzl@redhat.com
Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/scsi/mpt3sas/mpt3sas_base.c | 3 |
1 files changed, 3 insertions, 0 deletions
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", |