Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net:nfc:digital: Fix a double free in digital_tg_recv_dep_req
In digital_tg_recv_dep_req, it calls nfc_tm_data_received(..,resp). If nfc_tm_data_received() failed, the callee will free the resp via kfree_skb() and return error. But in the exit branch, the resp will be freed again. My patch sets resp to NULL if nfc_tm_data_received() failed, to avoid the double free. Fixes: 1c7a4c2 ("NFC Digital: Add target NFC-DEP support") Signed-off-by: Lv Yunlong <[email protected]> Signed-off-by: David S. Miller <[email protected]>
- Loading branch information