linux/net/bluetooth
Zhengchao Shao 8ac6043bd3 Bluetooth: hci_sync: fix memory leak in hci_update_adv_data()
[ Upstream commit 1ed8b37cba ]

When hci_cmd_sync_queue() failed in hci_update_adv_data(), inst_ptr is
not freed, which will cause memory leak, convert to use ERR_PTR/PTR_ERR
to pass the instance to callback so no memory needs to be allocated.

Fixes: 651cd3d65b ("Bluetooth: convert hci_update_adv_data to hci_sync")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-01 08:34:22 +01:00
..
bnep
cmtp
hidp
rfcomm Bluetooth: RFCOMM: don't call kfree_skb() under spin_lock_irqsave() 2022-12-31 13:32:29 +01:00
6lowpan.c Bluetooth: 6LoWPAN: add missing hci_dev_put() in get_l2cap_conn() 2022-12-02 13:09:30 -08:00
a2mp.c
a2mp.h
af_bluetooth.c Bluetooth: Fix not cleanup led when bt_init fails 2022-12-02 13:09:31 -08:00
amp.c
amp.h
aosp.c
aosp.h
ecdh_helper.c
ecdh_helper.h
eir.c
eir.h
hci_codec.c Bluetooth: Fix support for Read Local Supported Codecs V2 2022-12-02 13:09:31 -08:00
hci_codec.h
hci_conn.c Bluetooth: hci_conn: Fix memory leaks 2023-02-01 08:34:21 +01:00
hci_core.c Bluetooth: hci_core: don't call kfree_skb() under spin_lock_irqsave() 2022-12-31 13:32:29 +01:00
hci_debugfs.c
hci_debugfs.h
hci_event.c
hci_request.c Bluetooth: silence a dmesg error message in hci_request.c 2022-12-02 13:09:30 -08:00
hci_request.h
hci_sock.c
hci_sync.c Bluetooth: hci_sync: fix memory leak in hci_update_adv_data() 2023-02-01 08:34:22 +01:00
hci_sysfs.c
iso.c Bluetooth: hci_conn: add missing hci_dev_put() in iso_listen_bis() 2022-12-02 13:09:30 -08:00
Kconfig
l2cap_core.c Bluetooth: L2CAP: Fix u8 overflow 2022-12-02 13:09:30 -08:00
l2cap_sock.c
leds.c
leds.h
lib.c Bluetooth: Fix EALREADY and ELOOP cases in bt_status() 2022-12-31 13:32:28 +01:00
Makefile
mgmt_config.c
mgmt_config.h
mgmt_util.c
mgmt_util.h Bluetooth: Fix a buffer overflow in mgmt_mesh_add() 2023-02-01 08:34:21 +01:00
mgmt.c Bluetooth: MGMT: Fix error report for ADD_EXT_ADV_PARAMS 2022-12-31 13:32:28 +01:00
msft.c
msft.h
sco.c
selftest.c
selftest.h
smp.c
smp.h