Skip to content
Commit 7bf1ed6a authored by Shang XiaoJing's avatar Shang XiaoJing Committed by David S. Miller
Browse files

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: dece4585

 ("NFC: nxp-nci: Add support for NXP NCI chips")
Signed-off-by: default avatarShang XiaoJing <shangxiaojing@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8e4aae6b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment