Bluetooth: Mesh: Fix reference count imbalance in bt_mesh_net_resend()
The commit 1c7b668804
tried to fix
resending segments to the GATT bearer, however it got the buffer
refernce counting wrong. The bt_mesh_net_resend() function doesn't
own a reference to the buffer, i.e. it's not responsible for unrefing
it. E.g. bt_mesh_adv_send() takes its own reference.
What was missing however was the handling of the callbacks. Use the
recently introduced send_cb_finalize() helper to make sure they're
called.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
104d30c989
commit
286a59c8b5
1 changed files with 1 additions and 1 deletions
|
@ -783,7 +783,7 @@ int bt_mesh_net_resend(struct bt_mesh_subnet *sub, struct net_buf *buf,
|
|||
|
||||
if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY) &&
|
||||
bt_mesh_proxy_relay(&buf->b, dst)) {
|
||||
net_buf_unref(buf);
|
||||
send_cb_finalize(cb, cb_data);
|
||||
} else {
|
||||
bt_mesh_adv_send(buf, cb, cb_data);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue