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

nfc: nfcmrvl: Fix potential memory leak in nfcmrvl_i2c_nci_send()

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()
won't free the skb when it failed for the test_bit(). Free the skb when
test_bit() failed.

Fixes: b5b3e23e

 ("NFC: nfcmrvl: add i2c driver")
Signed-off-by: default avatarShang XiaoJing <shangxiaojing@huawei.com>
Suggested-by: default avatarPavel Machek <pavel@denx.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7cef6b73
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