scsi: lpfc: avoid double free of resource identifiers
authorRoberto Sassu <rsassu@suse.de>
Wed, 11 Jan 2017 10:06:42 +0000 (11:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jul 2017 12:40:24 +0000 (14:40 +0200)
commitc32462d0b5232712f8a2a1d6cedb731115ba6f7b
tree551ee9ba5a2e1c0872e66221d78c35b5559bb039
parent582c1ca0ea1d13a9e2912c5a7530f0728b3c3d1c
scsi: lpfc: avoid double free of resource identifiers

[ Upstream commit cd60be4916ae689387d04b86b6fc15931e4c95ae ]

Set variables initialized in lpfc_sli4_alloc_resource_identifiers() to
NULL if an error occurred. Otherwise, lpfc_sli4_driver_resource_unset()
attempts to free the memory again.

Signed-off-by: Roberto Sassu <rsassu@suse.de>
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/lpfc/lpfc_sli.c