Skip to content

Commit

Permalink
Bluetooth: iso: Always release hdev at the end of iso_listen_bis
Browse files Browse the repository at this point in the history
Since hci_get_route holds the device before returning, the hdev
should be released with hci_dev_put at the end of iso_listen_bis
even if the function returns with an error.

Fixes: 02171da ("Bluetooth: ISO: Add hcon for listening bis sk")
Signed-off-by: Iulia Tanasescu <[email protected]>
Signed-off-by: Luiz Augusto von Dentz <[email protected]>
  • Loading branch information
iulia-tanasescu authored and Vudentz committed Dec 12, 2024
1 parent 581dd2d commit 9c76fff
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/bluetooth/iso.c
Original file line number Diff line number Diff line change
Expand Up @@ -1158,10 +1158,9 @@ static int iso_listen_bis(struct sock *sk)
goto unlock;
}

hci_dev_put(hdev);

unlock:
hci_dev_unlock(hdev);
hci_dev_put(hdev);
return err;
}

Expand Down

0 comments on commit 9c76fff

Please sign in to comment.