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


The following commit(s) were added to refs/heads/master by this push:
     new 741651b  mesh: don't free mbuf in bt_mesh_adv_create_from_pool 
Coverity caught that freeing of buf in this function was unreachable; it's 
correct, as this buf shouldn't be freed at all.
741651b is described below

commit 741651b8a57998b2f937ab68665966d248633b98
Author: Krzysztof Kopyściński <[email protected]>
AuthorDate: Thu Mar 11 07:50:10 2021 +0100

    mesh: don't free mbuf in bt_mesh_adv_create_from_pool
    Coverity caught that freeing of buf in this function was unreachable;
    it's correct, as this buf shouldn't be freed at all.
---
 nimble/host/mesh/src/adv.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/nimble/host/mesh/src/adv.c b/nimble/host/mesh/src/adv.c
index 2b6287e..7e0e192 100644
--- a/nimble/host/mesh/src/adv.c
+++ b/nimble/host/mesh/src/adv.c
@@ -232,7 +232,6 @@ 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);
 
-       os_mbuf_free_chain(buf);
        return buf;
 }
 

Reply via email to