WSL2-Linux-Kernel/drivers/nfc/nfcmrvl
Shang XiaoJing 5dfdac5e3f nfc: nfcmrvl: Fix potential memory leak in nfcmrvl_i2c_nci_send()
[ Upstream commit 93d904a734 ]

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 18:15:28 +01:00
..
Kconfig nfc: Fix Kconfig indentation 2019-11-20 12:30:40 -08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fw_dnld.c nfc: mrvl: constify several pointers 2021-07-29 12:28:03 +01:00
fw_dnld.h nfc: mrvl: use SPDX-License-Identifier 2021-05-31 21:31:09 -07:00
i2c.c nfc: nfcmrvl: Fix potential memory leak in nfcmrvl_i2c_nci_send() 2022-11-10 18:15:28 +01:00
main.c nfc: nfcmrvl: main: reorder destructive operations in nfcmrvl_nci_unregister_dev to avoid bugs 2022-05-12 12:30:10 +02:00
nfcmrvl.h nfc: mrvl: constify static nfcmrvl_if_ops 2021-07-29 12:28:03 +01:00
spi.c nfc: nfcmrvl: Fix irq_of_parse_and_map() return value 2022-07-07 17:53:28 +02:00
uart.c nfc: mrvl: constify static nfcmrvl_if_ops 2021-07-29 12:28:03 +01:00
usb.c nfc: nfcmrvl: Fix memory leak in nfcmrvl_play_deferred 2022-06-22 14:21:58 +02:00