scsi: lpfc: Fix ancient double free
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 25 Jan 2021 08:44:34 +0000 (11:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:38:01 +0000 (11:38 +0100)
commit2dbc0ea1d141c2efc186f416b3b25d8535dbe7a9
treee6084f0513c6e83b07ba759850f2dcb3d03f1a26
parentc41fc75addf12239b9baa7ad3b4e5ce9ff49d809
scsi: lpfc: Fix ancient double free

[ Upstream commit 0be310979e5e1272d4c5b557642df4da4ce7eba4 ]

The "pmb" pointer is freed at the start of the function and then freed
again in the error handling code.

Link: https://lore.kernel.org/r/YA6E8rO51hE56SVw@mwanda
Fixes: 92d7f7b0cde3 ("[SCSI] lpfc: NPIV: add NPIV support on top of SLI-3")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/lpfc/lpfc_hbadisc.c