Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79aecc72 authored by David S. Miller's avatar David S. Miller
Browse files


Johan Hedberg says:

====================
pull request: bluetooth 2015-12-01

Here's a Bluetooth fix for the 4.4-rc series that fixes a memory leak of
the Security Manager L2CAP channel that'll happen for every LE
connection.

Please let me know if there are any issues pulling. Thanks.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents df849ba3 7883746b
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -3027,8 +3027,13 @@ static void smp_ready_cb(struct l2cap_chan *chan)

	BT_DBG("chan %p", chan);

	/* No need to call l2cap_chan_hold() here since we already own
	 * the reference taken in smp_new_conn_cb(). This is just the
	 * first time that we tie it to a specific pointer. The code in
	 * l2cap_core.c ensures that there's no risk this function wont
	 * get called if smp_new_conn_cb was previously called.
	 */
	conn->smp = chan;
	l2cap_chan_hold(chan);

	if (hcon->type == ACL_LINK && test_bit(HCI_CONN_ENCRYPT, &hcon->flags))
		bredr_pairing(chan);