Skip to content
Permalink
Browse files

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>
  • Loading branch information...
pdunaj authored and carlescufi committed Apr 17, 2019
1 parent d4dbab9 commit 56a2691e1c5ff1c1791289a491cdd32ee867c192
Showing with 1 addition and 0 deletions.
  1. +1 −0 subsys/bluetooth/host/conn.c
@@ -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;
}

0 comments on commit 56a2691

Please sign in to comment.
You can’t perform that action at this time.