diff options
author | Colin Ian King <colin.king@canonical.com> | 2020-11-18 15:13:14 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-11-20 04:16:00 +0100 |
commit | 14c1dd9504112ffe86688ff0cd64149e16d36772 (patch) | |
tree | abaec277e14ca5d71da4ebcdf1e72eb22d2ab0a5 /drivers/scsi/lpfc/lpfc_ct.c | |
parent | scsi: lpfc: Remove dead code on second !ndlp check (diff) | |
download | linux-14c1dd9504112ffe86688ff0cd64149e16d36772.tar.xz linux-14c1dd9504112ffe86688ff0cd64149e16d36772.zip |
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: 4430f7fd09ec ("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")
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_ct.c')
0 files changed, 0 insertions, 0 deletions