Skip to content

Commit b8dfecf

Browse files
andrzej-kaczmarekcarlescufi
authored andcommitted
Bluetooth: conn: Fix invalid ref on conn object
We should unref conn object if skipped during lookup. Signed-off-by: Andrzej Kaczmarek <[email protected]>
1 parent 3e6ea47 commit b8dfecf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/bluetooth/host/conn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1791,7 +1791,7 @@ struct bt_conn *bt_conn_lookup_state_le(uint8_t id, const bt_addr_le_t *peer,
17911791
}
17921792

17931793
if (conn->type != BT_CONN_TYPE_LE) {
1794-
bt_conn_ref(conn);
1794+
bt_conn_unref(conn);
17951795
continue;
17961796
}
17971797

0 commit comments

Comments
 (0)