WSL2-Linux-Kernel/drivers/nfc/nxp-nci
Shang XiaoJing 3cba1f061b nfc: nxp-nci: Fix potential memory leak in nxp_nci_send()
[ Upstream commit 7bf1ed6aff ]

nxp_nci_send() will call nxp_nci_i2c_write(), and only free skb when
nxp_nci_i2c_write() failed. However, even if the nxp_nci_i2c_write()
run succeeds, the skb will not be freed in nxp_nci_i2c_write(). As the
result, the skb will memleak. nxp_nci_send() should also free the skb
when nxp_nci_i2c_write() succeeds.

Fixes: dece45855a ("NFC: nxp-nci: Add support for NXP NCI chips")
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 treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
core.c nfc: nxp-nci: Fix potential memory leak in nxp_nci_send() 2022-11-10 18:15:27 +01:00
firmware.c NFC: nxp-nci: remove unnecessary label 2021-06-18 12:57:30 -07:00
i2c.c NFC: nxp-nci: don't print header length mismatch on i2c error 2022-07-21 21:24:35 +02:00
nxp-nci.h