Bluetooth: Mesh: Fixes wrong prov pointer clear
The structure pointer was wrongly cleared before, `bearer` and `role` in `bt_mesh_prov_link` structure resulting in illegal pointer access. Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
This commit is contained in:
parent
d262b064a2
commit
109d6d4d8c
2 changed files with 6 additions and 5 deletions
|
@ -59,6 +59,7 @@ int bt_mesh_prov_reset_state(void (*func)(const uint8_t key[64]))
|
|||
bt_mesh_attention(NULL, 0);
|
||||
}
|
||||
|
||||
atomic_clear(bt_mesh_prov_link.flags);
|
||||
(void)memset((uint8_t *)&bt_mesh_prov_link + offset, 0,
|
||||
sizeof(bt_mesh_prov_link) - offset);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue