linux-stable/net/nfc
Miaoqian Lin a743128fca nfc: Fix potential resource leaks
[ Upstream commit df49908f3c ]

nfc_get_device() take reference for the device, add missing
nfc_put_device() to release it when not need anymore.
Also fix the style warnning by use error EOPNOTSUPP instead of
ENOTSUPP.

Fixes: 5ce3f32b52 ("NFC: netlink: SE API implementation")
Fixes: 29e76924cf ("nfc: netlink: Add capability to reply to vendor_cmd with data")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-12 12:00:32 +01:00
..
hci nfc: drop unneeded debug prints 2021-10-11 17:00:51 -07:00
nci NFC: nci: Bounds check struct nfc_target arrays 2022-12-14 11:41:02 +01:00
Kconfig net: remove redundant 'depends on NET' 2021-01-27 17:04:12 -08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
af_nfc.c nfc: fix error handling of nfc_proto_register() 2021-10-13 17:32:38 -07:00
core.c net: nfc: Directly use ida_alloc()/free() 2022-05-28 15:28:47 +01:00
digital.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
digital_core.c NFC: digital: fix possible memory leak in digital_tg_listen_mdaa() 2021-10-13 17:44:29 -07:00
digital_dep.c net:nfc:digital: Fix a double free in digital_tg_recv_dep_req 2021-04-27 15:36:10 -07:00
digital_technology.c NFC: digital: fix possible memory leak in digital_in_send_sdd_req() 2021-10-13 17:44:29 -07:00
llcp.h nfc: llcp: Revert "NFC: Keep socket alive until the DISC PDU is actually sent" 2022-03-03 10:43:37 +00:00
llcp_commands.c nfc: drop unneeded debug prints 2021-10-11 17:00:51 -07:00
llcp_core.c nfc: llcp: Revert "NFC: Keep socket alive until the DISC PDU is actually sent" 2022-03-03 10:43:37 +00:00
llcp_sock.c net: remove noblock parameter from skb_recv_datagram() 2022-04-06 13:45:26 +01:00
netlink.c nfc: Fix potential resource leaks 2023-01-12 12:00:32 +01:00
nfc.h nfc: constify several pointers to u8, char and sk_buff 2021-07-30 17:22:52 +02:00
rawsock.c net: remove noblock parameter from skb_recv_datagram() 2022-04-06 13:45:26 +01:00