Bluetooth: Mesh: Fix possible NULL dereference in BT_DBG statement.
Fix possible NULL dereference in BT_DBG statement when bt_mesh_friend_get is called before a successful cfg_srv init Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
parent
2835da8194
commit
c97e1aafb1
1 changed files with 2 additions and 1 deletions
|
@ -3416,7 +3416,8 @@ u8_t bt_mesh_relay_get(void)
|
||||||
|
|
||||||
u8_t bt_mesh_friend_get(void)
|
u8_t bt_mesh_friend_get(void)
|
||||||
{
|
{
|
||||||
BT_DBG("conf %p conf->frnd 0x%02x", conf, conf->frnd);
|
BT_DBG("conf %p conf->frnd 0x%02x", conf,
|
||||||
|
conf ? conf->frnd : BT_MESH_FRIEND_NOT_SUPPORTED);
|
||||||
|
|
||||||
if (conf) {
|
if (conf) {
|
||||||
return conf->frnd;
|
return conf->frnd;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue