WSL2-Linux-Kernel/drivers/nfc/s3fwrn5
Shang XiaoJing 7486f5c900 nfc: s3fwrn5: Fix potential memory leak in s3fwrn5_nci_send()
[ Upstream commit 3a146b7e30 ]

s3fwrn5_nci_send() will call s3fwrn5_i2c_write() or s3fwrn82_uart_write(),
and free the skb if write() failed. However, even if the write() run
succeeds, the skb will not be freed in write(). As the result, the skb
will memleak. s3fwrn5_nci_send() should also free the skb when write()
succeeds.

Fixes: c04c674fad ("nfc: s3fwrn5: Add driver for Samsung S3FWRN5 NFC Chip")
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-11-10 18:15:27 +01:00
..
Kconfig
Makefile
core.c nfc: s3fwrn5: Fix potential memory leak in s3fwrn5_nci_send() 2022-11-10 18:15:27 +01:00
firmware.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-07-31 09:14:46 -07:00
firmware.h
i2c.c
nci.c nfc: constify nci_driver_ops (prop_ops and core_ops) 2021-07-25 09:21:21 +01:00
nci.h nfc: constify nci_driver_ops (prop_ops and core_ops) 2021-07-25 09:21:21 +01:00
phy_common.c
phy_common.h
s3fwrn5.h
uart.c