Searched hist:"7 bf1ed6a" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/nfc/nxp-nci/ |
H A D | core.c | 7bf1ed6a Thu Oct 27 09:03:30 CDT 2022 Shang XiaoJing <shangxiaojing@huawei.com> nfc: nxp-nci: Fix potential memory leak in nxp_nci_send()
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: dece45855a8b ("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>
|