Skip to content
Commit d84528ed authored by Joakim Andersson's avatar Joakim Andersson Committed by Johan Hedberg
Browse files

Bluetooth: ATT: Fix ATT corrupting mem_slab structure after free



Fix ATT releasing the att structure back to the memory slab allocator
before the structure is actually ready to be released. The memory slab
allocator will write context data inside the freed slab which is
currently being overwritten by l2cap during channel teardown.

This manifests as an "Unable to allocate ATT context for conn" when
reconnecting with multiple connections.

Since the l2cap channel is embedded inside of the ATT context and l2cap
still has a valid referenc to the l2cap channel we need to release the
ATT context at a later time.
This should be fixed by implementing the channel destroy function and
releasing the channel there.

Signed-off-by: default avatarJoakim Andersson <joakim.andersson@nordicsemi.no>
parent 83f108af
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment