From: Tomas Henzl Date: Thu, 2 Mar 2023 23:43:31 +0000 (+0100) Subject: scsi: mpi3mr: Fix throttle_groups memory leak X-Git-Tag: v6.2.8~198 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=85349a227eb4a56520adc190c666075f80d4ae70;p=thirdparty%2Fkernel%2Fstable.git scsi: mpi3mr: Fix throttle_groups memory leak [ Upstream commit f305a7b6ca21a665e8d0cf70b5936991a298c93c ] Add a missing kfree(). Fixes: f10af057325c ("scsi: mpi3mr: Resource Based Metering") Signed-off-by: Tomas Henzl Link: https://lore.kernel.org/r/20230302234336.25456-2-thenzl@redhat.com Acked-by: Sathya Prakash Veerichetty Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c index 758f7ca9e0ee8..9c716d92c2564 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c @@ -4357,6 +4357,9 @@ void mpi3mr_free_mem(struct mpi3mr_ioc *mrioc) mrioc->pel_seqnum_virt = NULL; } + kfree(mrioc->throttle_groups); + mrioc->throttle_groups = NULL; + kfree(mrioc->logdata_buf); mrioc->logdata_buf = NULL;