]> git.baikalelectronics.ru Git - kernel.git/commit
NFC: st21nfca: fix double free
authorPan Bian <bianpan2016@163.com>
Thu, 7 Nov 2019 01:33:20 +0000 (09:33 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Nov 2019 05:48:29 +0000 (21:48 -0800)
commite380aae2a94f023da481ba9a86be04ad062fa778
treeed92ada605c3dbdcb6438597daa1a287c737be5b
parente8f6a0a10ac9a9f0e42bf1f088361babf4c0072b
NFC: st21nfca: fix double free

The variable nfcid_skb is not changed in the callee nfc_hci_get_param()
if error occurs. Consequently, the freed variable nfcid_skb will be
freed again, resulting in a double free bug. Set nfcid_skb to NULL after
releasing it to fix the bug.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/nfc/st21nfca/core.c