linux_dsm_epyc7002/drivers/mtd/spi-nor
Wenwen Wang 313aca5a9c
mtd: spi-nor: fix a memory leak bug
In spi_nor_parse_4bait(), 'dwords' is allocated through kmalloc(). However,
it is not deallocated in the following execution if spi_nor_read_sfdp()
fails, leading to a memory leak. To fix this issue, free 'dwords' before
returning the error.

Fixes: 816873eaee ("mtd: spi-nor: parse SFDP 4-byte Address Instruction Table")
Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
2019-08-21 11:08:01 +03:00
..
aspeed-smc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
cadence-quadspi.c mtd: spi-nor: Fix Cadence QSPI RCU Schedule Stall 2019-08-21 10:07:42 +03:00
hisi-sfc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
intel-spi-pci.c mtd: spi-nor: intel-spi: Add support for Intel Tiger Lake SPI serial flash 2019-08-20 17:47:18 +03:00
intel-spi-platform.c mtd: spi-nor: intel-spi: Convert to use SPDX identifier 2019-06-22 14:59:27 +03:00
intel-spi.c mtd: spi-nor: intel-spi: Convert to use SPDX identifier 2019-06-22 14:59:27 +03:00
intel-spi.h mtd: spi-nor: intel-spi: Convert to use SPDX identifier 2019-06-22 14:59:27 +03:00
Kconfig mtd: spi-nor: Move m25p80 code in spi-nor.c 2019-08-12 10:54:12 +03:00
Makefile mtd: spi-nor: stm32: remove the driver as it was replaced by spi-stm32-qspi.c 2019-06-07 07:10:38 +03:00
mtk-quadspi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
nxp-spifi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
spi-nor.c mtd: spi-nor: fix a memory leak bug 2019-08-21 11:08:01 +03:00