Skip to content

Commit 06ebe23

Browse files
Thalleynashif
authored andcommitted
Bluetooth: ISO: Add NULL check in cleanup_big
In case that creating a BIG fails due to missing ISO channel, cleanup_big would try to access a NULL pointer. Signed-off-by: Emil Gydesen <[email protected]>
1 parent 77509a3 commit 06ebe23

File tree

1 file changed

+1
-1
lines changed
  • subsys/bluetooth/host

1 file changed

+1
-1
lines changed

subsys/bluetooth/host/iso.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1320,7 +1320,7 @@ static void cleanup_big(struct bt_iso_big *big)
13201320
for (int i = 0; i < big->num_bis; i++) {
13211321
struct bt_iso_chan *bis = big->bis[i];
13221322

1323-
if (bis->conn) {
1323+
if (bis != NULL && bis->conn != NULL) {
13241324
bt_conn_unref(bis->conn);
13251325
bis->conn = NULL;
13261326
}

0 commit comments

Comments
 (0)