Skip to content
Commit 192e425b authored by Emil Gydesen's avatar Emil Gydesen Committed by Carles Cufí
Browse files

Bluetooth: Host: Add NULL check for addr in unpair



unpair may be called from bt_unpair where addr is NULL.
One such case is the `bt clear all` shell command which
calls bt_unpair with addr = NULL, and the addr is just forwarded
to unpair which does not check for NULL.

bt_unpair allows for the addr to be NULL to clear all, but only
if SMP is enabled.

Modified the checks in bt_unpair to increase readability
and ensure that unpair is not called with NULL.

Signed-off-by: default avatarEmil Gydesen <emil.gydesen@nordicsemi.no>
parent d25626c7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment