Commit e8e91593 authored by Shang XiaoJing's avatar Shang XiaoJing Committed by Lipeng Sang
Browse files

nfc: fdp: Fix potential memory leak in fdp_nci_send()

stable inclusion
from stable-v5.10.154
commit e8c11ee2d07f7c4dfa2ac0ea8efc4f627e58ea57
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I64YCB

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e8c11ee2d07f7c4dfa2ac0ea8efc4f627e58ea57



--------------------------------

[ Upstream commit 8e4aae6b ]

fdp_nci_send() will call fdp_nci_i2c_write that will not free skb in
the function. As a result, when fdp_nci_i2c_write() finished, the skb
will memleak. fdp_nci_send() should free skb after fdp_nci_i2c_write()
finished.

Fixes: a06347c0 ("NFC: Add Intel Fields Peak NFC solution driver")
Signed-off-by: default avatarShang XiaoJing <shangxiaojing@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarLipeng Sang <sanglipeng1@jd.com>
parent 54d4d9ee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment