Skip to content

Commit cf20b6d

Browse files
committed
mesh/adv.c: free os_mbuf in bt_mesh_adv_create_from_pool before return
call of os_mbuf_free_chain was unreachable
1 parent 40b8976 commit cf20b6d

File tree

1 file changed

+1
-1
lines changed
  • nimble/host/mesh/src

1 file changed

+1
-1
lines changed

nimble/host/mesh/src/adv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ struct os_mbuf *bt_mesh_adv_create_from_pool(struct os_mbuf_pool *pool,
232232
adv->ref_cnt = 1;
233233
ble_npl_event_set_arg(&adv->ev, buf);
234234

235-
return buf;
236235
os_mbuf_free_chain(buf);
236+
return buf;
237237
}
238238

239239
struct os_mbuf *bt_mesh_adv_create(enum bt_mesh_adv_type type, uint8_t xmit,

0 commit comments

Comments
 (0)