linux-stable/drivers/nfc/s3fwrn5
Shang XiaoJing a53e9ef6f4 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:17:17 +01:00
..
core.c nfc: s3fwrn5: Fix potential memory leak in s3fwrn5_nci_send() 2022-11-10 18:17:17 +01:00
firmware.c nfc: s3fwrn5: simplify dereferencing pointer to struct device 2021-10-11 17:00:51 -07:00
firmware.h nfc: s3fwrn5: skip the NFC bootloader mode 2020-12-04 15:30:47 -08:00
i2c.c nfc: s3fwrn5: mark OF device ID tables as maybe unused 2021-05-28 15:05:56 -07:00
Kconfig nfc: s3fwrn5: Support a UART interface 2020-12-02 17:55:25 -08:00
Makefile nfc: s3fwrn5: Support a UART interface 2020-12-02 17:55:25 -08:00
nci.c nfc: s3fwrn5: simplify dereferencing pointer to struct device 2021-10-11 17:00:51 -07:00
nci.h nfc: constify nci_driver_ops (prop_ops and core_ops) 2021-07-25 09:21:21 +01:00
phy_common.c nfc: s3fwrn5: Remove the delay for NFC sleep 2020-12-16 13:09:35 -08:00
phy_common.h nfc: s3fwrn5: Support a UART interface 2020-12-02 17:55:25 -08:00
s3fwrn5.h nfc: s3fwrn5: Change the error code 2020-11-18 17:42:13 -08:00
uart.c nfc: s3fwrn5: Support a UART interface 2020-12-02 17:55:25 -08:00