tests: Bluetooth: shell: Fix connection reference leak

This fixes regression introduced in recently.
Redundant connection reference is taken twice in connected()
callback. The redunant reference was then not returned, and
as a result we had a leak.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This commit is contained in:
Mariusz Skamra 2023-12-13 12:56:52 +01:00 committed by Fabio Baltieri
parent f9fa2ae77c
commit d2745d6dba

View File

@ -694,8 +694,6 @@ static void connected(struct bt_conn *conn, uint8_t err)
}
}
default_conn = bt_conn_ref(conn);
done:
/* clear connection reference for sec mode 3 pairing */
if (pairing_conn) {