android_kernel_xiaomi_sm8350/drivers/nfc/nfcmrvl
Shang XiaoJing f30060efcf nfc: nfcmrvl: Fix potential memory leak in nfcmrvl_i2c_nci_send()
[ Upstream commit 93d904a734a74c54d945a9884b4962977f1176cd ]

nfcmrvl_i2c_nci_send() will be called by nfcmrvl_nci_send(), and skb
should be freed in nfcmrvl_i2c_nci_send(). However, nfcmrvl_nci_send()
will only free skb when i2c_master_send() return >=0, which means skb
will memleak when i2c_master_send() failed. Free skb no matter whether
i2c_master_send() succeeds.

Fixes: b5b3e23e4c ("NFC: nfcmrvl: add i2c driver")
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 17:57:50 +01:00
..
fw_dnld.c
fw_dnld.h
i2c.c nfc: nfcmrvl: Fix potential memory leak in nfcmrvl_i2c_nci_send() 2022-11-10 17:57:50 +01:00
Kconfig
main.c
Makefile
nfcmrvl.h
spi.c nfc: nfcmrvl: Fix irq_of_parse_and_map() return value 2022-07-07 17:36:50 +02:00
uart.c
usb.c