bluetooth: host: Unref conn on direct adv start error
Unref conn when direct adv start exits with an error. Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
This commit is contained in:
parent
d4dbab9f83
commit
56a2691e1c
1 changed files with 1 additions and 0 deletions
|
@ -2043,6 +2043,7 @@ struct bt_conn *bt_conn_create_slave_le(const bt_addr_le_t *peer,
|
|||
if (err && (err != -EALREADY)) {
|
||||
BT_WARN("Directed advertising could not be"
|
||||
" started: %d", err);
|
||||
bt_conn_unref(conn);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue