mesh/adv.c: free os_mbuf in bt_mesh_adv_create_from_pool before return
call of os_mbuf_free_chain was unreachable
@@ -232,8 +232,8 @@ struct os_mbuf *bt_mesh_adv_create_from_pool(struct os_mbuf_pool *pool,
adv->ref_cnt = 1;
ble_npl_event_set_arg(&adv->ev, buf);
- return buf;
os_mbuf_free_chain(buf);
+ return buf;
}
struct os_mbuf *bt_mesh_adv_create(enum bt_mesh_adv_type type, uint8_t xmit,
