Skip to content
Snippets Groups Projects
Commit 1ed8b37c authored by Zhengchao Shao's avatar Zhengchao Shao Committed by Luiz Augusto von Dentz
Browse files

Bluetooth: hci_sync: fix memory leak in hci_update_adv_data()


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: 651cd3d6 ("Bluetooth: convert hci_update_adv_data to hci_sync")
Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent 272970be
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment