summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
diff options
context:
space:
mode:
authorWenwen Wang <wenwen@cs.uga.edu>2019-08-19 20:16:00 +0300
committerTudor Ambarus <tudor.ambarus@microchip.com>2019-08-21 11:08:01 +0300
commit313aca5a9c781a19537e6cc882511c13eff3bdba (patch)
tree57ed72338e325246107d198b55760da063509465 /drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
parent3e9e38d918bd01068b5ccba17d69a8ae9bf56142 (diff)
downloadlinux-313aca5a9c781a19537e6cc882511c13eff3bdba.tar.xz
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: 816873eaeec6 ("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>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/t4_hw.c')
0 files changed, 0 insertions, 0 deletions