Skip to content

Commit 06d3c77

Browse files
Justin Teemartinkpetersen
authored andcommitted
scsi: lpfc: Fix memory leak when nvmeio_trc debugfs entry is used
Right after phba->nvmeio_trc is kzalloc'ed, phba->nvmeio_trc is set to NULL and the memory reference to free the kzalloc'ed memory is lost. Remove the phba->nvmeio_trc NULL ptr assignment after kzalloc. phba->nvmeio_trc is freed in lpfc_debugfs_terminate. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Message-ID: <20250915180811.137530-10-justintee8345@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 5de0977 commit 06d3c77

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

drivers/scsi/lpfc/lpfc_debugfs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6280,7 +6280,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
62806280
}
62816281
phba->nvmeio_trc_on = 1;
62826282
phba->nvmeio_trc_output_idx = 0;
6283-
phba->nvmeio_trc = NULL;
62846283
} else {
62856284
nvmeio_off:
62866285
phba->nvmeio_trc_size = 0;

0 commit comments

Comments
 (0)