linux/drivers/scsi/lpfc
Colin Ian King 14c1dd9504 scsi: lpfc: Fix memory leak on lcb_context
Currently there is an error return path that neglects to free the
allocation for lcb_context.  Fix this by adding a new error free exit path
that kfree's lcb_context before returning.  Use this new kfree exit path in
another exit error path that also kfree's the same object, allowing a line
of code to be removed.

Link: https://lore.kernel.org/r/20201118141314.462471-1-colin.king@canonical.com
Fixes: 4430f7fd09 ("scsi: lpfc: Rework locations of ndlp reference taking")
Reviewed-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Addresses-Coverity: ("Resource leak")
2020-11-19 22:16:00 -05:00
..
lpfc_attr.c scsi: lpfc: Rework remote port lock handling 2020-11-17 00:43:54 -05:00
lpfc_attr.h
lpfc_bsg.c scsi: lpfc: Remove dead code on second !ndlp check 2020-11-19 22:15:19 -05:00
lpfc_bsg.h scsi: lpfc: Allow applications to issue Common Set Features mailbox command 2020-07-02 23:06:40 -04:00
lpfc_compat.h
lpfc_crtn.h scsi: lpfc: Update changed file copyrights for 2020 2020-11-17 00:43:56 -05:00
lpfc_ct.c scsi: lpfc: Rework remote port lock handling 2020-11-17 00:43:54 -05:00
lpfc_debugfs.c scsi: lpfc: Update changed file copyrights for 2020 2020-11-17 00:43:56 -05:00
lpfc_debugfs.h scsi: lpfc: Make debugfs ktime stats generic for NVME and SCSI 2020-03-29 18:10:58 -04:00
lpfc_disc.h scsi: lpfc: Update changed file copyrights for 2020 2020-11-17 00:43:56 -05:00
lpfc_els.c scsi: lpfc: Fix memory leak on lcb_context 2020-11-19 22:16:00 -05:00
lpfc_hbadisc.c scsi: lpfc: Convert abort handling to SLI-3 and SLI-4 handlers 2020-11-17 00:43:56 -05:00
lpfc_hw4.h scsi: lpfc: Update changed file copyrights for 2020 2020-11-17 00:43:56 -05:00
lpfc_hw.h scsi: lpfc: Reject CT request for MIB commands 2020-10-26 21:42:39 -04:00
lpfc_ids.h
lpfc_init.c scsi: lpfc: Enable common wqe_template support for both SCSI and NVMe 2020-11-17 00:43:55 -05:00
lpfc_logmsg.h scsi: lpfc: Add an internal trace log buffer 2020-07-02 23:06:49 -04:00
lpfc_mbox.c scsi: lpfc: Fix a bunch of kerneldoc misdemeanors 2020-07-24 22:32:03 -04:00
lpfc_mem.c scsi: lpfc: Re-fix use after free in lpfc_rq_buf_free() 2020-10-26 21:42:38 -04:00
lpfc_nl.h
lpfc_nportdisc.c scsi: lpfc: Update changed file copyrights for 2020 2020-11-17 00:43:56 -05:00
lpfc_nvme.c scsi: lpfc: Update changed file copyrights for 2020 2020-11-17 00:43:56 -05:00
lpfc_nvme.h scsi: lpfc: Update changed file copyrights for 2020 2020-11-17 00:43:56 -05:00
lpfc_nvmet.c scsi: lpfc: Update changed file copyrights for 2020 2020-11-17 00:43:56 -05:00
lpfc_scsi.c scsi: lpfc: Fix pointer defereference before it is null checked issue 2020-11-19 22:13:42 -05:00
lpfc_scsi.h scsi: lpfc: Update 12.2.0.0 file copyrights to 2019 2019-02-05 22:29:50 -05:00
lpfc_sli4.h scsi: lpfc: Add FDMI Vendor MIB support 2020-10-26 21:42:39 -04:00
lpfc_sli.c scsi: lpfc: Convert abort handling to SLI-3 and SLI-4 handlers 2020-11-17 00:43:56 -05:00
lpfc_sli.h scsi: lpfc: Update changed file copyrights for 2020 2020-11-17 00:43:56 -05:00
lpfc_version.h scsi: lpfc: Update lpfc version to 12.8.0.6 2020-11-17 00:43:56 -05:00
lpfc_vport.c scsi: lpfc: Update changed file copyrights for 2020 2020-11-17 00:43:56 -05:00
lpfc_vport.h
lpfc.h scsi: lpfc: Convert SCSI path to use common I/O submission path 2020-11-17 00:43:56 -05:00
Makefile