scsi: mpi3mr: Fix throttle_groups memory leak
authorTomas Henzl <thenzl@redhat.com>
Thu, 2 Mar 2023 23:43:31 +0000 (00:43 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 8 Mar 2023 02:17:22 +0000 (21:17 -0500)
Add a missing kfree().

Fixes: f10af057325c ("scsi: mpi3mr: Resource Based Metering")
Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Link: https://lore.kernel.org/r/20230302234336.25456-2-thenzl@redhat.com
Acked-by: Sathya Prakash Veerichetty <sathya.prakash@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpi3mr/mpi3mr_fw.c

index 29acf61..514ccf2 100644 (file)
@@ -4389,6 +4389,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;