This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How should received L2CAP packet data be freed?

There is an L2CAP_bm_alloc function for passing packet data to the stack using L2CAP.  Is there an equivalent for freeing data received from the stack?

Using ICall_free with the pkt.pPayload address eventually leads to memory allocation errors.  It appears these can be avoided by calling ICall_free with that address minus 19 bytes, but what is the official way of accounting for that offset and ensuring that any required housekeeping is performed when the packet data is freed.

Thanks,

Norman