Bluetooth: Mesh: Fix canceled buffer memory leak
In case a queued buffer is canceled before sending we have to unref it, since that's what adv_send() would do as well. Fixes #17936 Fixes #18013 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
94fcb211de
commit
5f6043bc35
1 changed files with 2 additions and 0 deletions
|
@ -186,6 +186,8 @@ static void adv_thread(void *p1, void *p2, void *p3)
|
|||
if (BT_MESH_ADV(buf)->busy) {
|
||||
BT_MESH_ADV(buf)->busy = 0U;
|
||||
adv_send(buf);
|
||||
} else {
|
||||
net_buf_unref(buf);
|
||||
}
|
||||
|
||||
STACK_ANALYZE("adv stack", adv_thread_stack);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue