mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 15:11:16 +00:00
Bluetooth: Fix memory leak with L2CAP channels
A new l2cap_chan_free() is added to free the channels. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
This commit is contained in:
parent
8c1d787be4
commit
6ff5abbf4e
3 changed files with 9 additions and 4 deletions
|
@ -849,6 +849,8 @@ void l2cap_sock_kill(struct sock *sk)
|
|||
BT_DBG("sk %p state %d", sk, sk->sk_state);
|
||||
|
||||
/* Kill poor orphan */
|
||||
|
||||
l2cap_chan_free(l2cap_pi(sk)->chan);
|
||||
bt_sock_unlink(&l2cap_sk_list, sk);
|
||||
sock_set_flag(sk, SOCK_DEAD);
|
||||
sock_put(sk);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue