scsi: lpfc: Fix memory leaks in error paths while issuing ELS RDF/SCR request
authorJames Smart <jsmart2021@gmail.com>
Wed, 7 Jul 2021 18:43:40 +0000 (11:43 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 19 Jul 2021 02:30:36 +0000 (22:30 -0400)
commitcd6047e92c6a5b0a44479cf98f76aac56ddfe108
treec9d606ea82206160f3cd747a426686720ceb0400
parent2d338eb55b14ab9d245e8b1d982adecca8c4c613
scsi: lpfc: Fix memory leaks in error paths while issuing ELS RDF/SCR request

The ELS job request structure, that is allocated while issuing ELS RDF/SCR
request path, is not being released in an error path causing a memory leak
message on driver unload.

Free the ELS job structure in the error paths.

Link: https://lore.kernel.org/r/20210707184351.67872-10-jsmart2021@gmail.com
Co-developed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_els.c