1
0
Fork 0
alistair23-linux/drivers/scsi/fcoe
Javed Hasan 41191f8c57 scsi: fcoe: Memory leak fix in fcoe_sysfs_fcf_del()
[ Upstream commit e95b4789ff ]

In fcoe_sysfs_fcf_del(), we first deleted the fcf from the list and then
freed it if ctlr_dev was not NULL. This was causing a memory leak.

Free the fcf even if ctlr_dev is NULL.

Link: https://lore.kernel.org/r/20200729081824.30996-3-jhasan@marvell.com
Reviewed-by: Girish Basrur <gbasrur@marvell.com>
Reviewed-by: Santosh Vernekar <svernekar@marvell.com>
Reviewed-by: Saurav Kashyap <skashyap@marvell.com>
Reviewed-by: Shyam Sundar <ssundar@marvell.com>
Signed-off-by: Javed Hasan <jhasan@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-09-03 11:26:47 +02:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
fcoe.c SCSI misc on 20190919 2019-09-21 10:50:15 -07:00
fcoe.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335 2019-06-05 17:37:06 +02:00
fcoe_ctlr.c scsi: fcoe: Memory leak fix in fcoe_sysfs_fcf_del() 2020-09-03 11:26:47 +02:00
fcoe_sysfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335 2019-06-05 17:37:06 +02:00
fcoe_transport.c net: Use skb_frag_off accessors 2019-07-30 14:21:32 -07:00
libfcoe.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00