Skip to content

Commit

Permalink
Bluetooth: 6LoWPAN: add missing hci_dev_put() in get_l2cap_conn()
Browse files Browse the repository at this point in the history
hci_get_route() takes reference, we should use hci_dev_put() to release
it when not need anymore.

Fixes: 6b8d4a6 ("Bluetooth: 6LoWPAN: Use connected oriented channel instead of fixed one")
Signed-off-by: Wang ShaoBo <[email protected]>
Signed-off-by: Luiz Augusto von Dentz <[email protected]>
  • Loading branch information
Wang ShaoBo authored and Vudentz committed Dec 2, 2022
1 parent 955aebd commit 747da13
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/bluetooth/6lowpan.c
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,7 @@ static int get_l2cap_conn(char *buf, bdaddr_t *addr, u8 *addr_type,
hci_dev_lock(hdev);
hcon = hci_conn_hash_lookup_le(hdev, addr, *addr_type);
hci_dev_unlock(hdev);
hci_dev_put(hdev);

if (!hcon)
return -ENOENT;
Expand Down

0 comments on commit 747da13

Please sign in to comment.