Bluetooth: Fix freeing up conn->tx_notify upon disconnect
It's possible that tx_notify still contains items when a Disconnect Complete happens. Since the normal path for processing tx_notify is not taken when the connection is not in CONNECTED state, we must make sure to process the list latest in conn_cleanup() that's called as one last thing before the connection object is freed up. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
059959c83e
commit
ee217d4051
1 changed files with 2 additions and 0 deletions
|
@ -1280,6 +1280,8 @@ static void conn_cleanup(struct bt_conn *conn)
|
||||||
|
|
||||||
__ASSERT(sys_slist_is_empty(&conn->tx_pending), "Pending TX packets");
|
__ASSERT(sys_slist_is_empty(&conn->tx_pending), "Pending TX packets");
|
||||||
|
|
||||||
|
bt_conn_notify_tx(conn);
|
||||||
|
|
||||||
bt_conn_reset_rx_state(conn);
|
bt_conn_reset_rx_state(conn);
|
||||||
|
|
||||||
/* Release the reference we took for the very first
|
/* Release the reference we took for the very first
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue