You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ko...@apache.org on 2021/03/04 06:12:29 UTC
[mynewt-nimble] 01/03: mesh/adv.c: free os_mbuf in
bt_mesh_adv_create_from_pool before return call of os_mbuf_free_chain was
unreachable
This is an automated email from the ASF dual-hosted git repository.
kopyscinski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit cf20b6d7487edec8133a9641be5e016f81524b5e
Author: Krzysztof Kopyściński <kr...@codecoup.pl>
AuthorDate: Tue Feb 23 09:19:05 2021 +0100
mesh/adv.c: free os_mbuf in bt_mesh_adv_create_from_pool before return
call of os_mbuf_free_chain was unreachable
---
nimble/host/mesh/src/adv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nimble/host/mesh/src/adv.c b/nimble/host/mesh/src/adv.c
index 46c8138..2b6287e 100644
--- a/nimble/host/mesh/src/adv.c
+++ b/nimble/host/mesh/src/adv.c
@@ -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,