Skip to content

Commit

Permalink
scsi: mpt3sas: Fix a memory leak
Browse files Browse the repository at this point in the history
Add a forgotten kfree().

Fixes: dbec4c9 ("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>
  • Loading branch information
Tomas Henzl authored and Martin K. Petersen committed Feb 9, 2023
1 parent d48a623 commit 54dd960
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/scsi/mpt3sas/mpt3sas_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 54dd960

Please sign in to comment.