Skip to content

Commit

Permalink
Bluetooth: A2DP: Fix NULL pointer references issue
Browse files Browse the repository at this point in the history
The opposite logic is used to determine if a
pointer is valid.

Correct the judgment logic.

Fixes #74728.

Signed-off-by: Lyle Zhu <[email protected]>
  • Loading branch information
lylezhu2012 committed Jul 3, 2024
1 parent 012520d commit 9aeb310
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/bluetooth/host/classic/a2dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ int bt_a2dp_stream_establish(struct bt_a2dp_stream *stream)

a2dp = stream->a2dp;
a2dp->open_param.req.func = bt_a2dp_open_cb;
a2dp->open_param.acp_stream_ep_id = stream->remote_ep == NULL ?
a2dp->open_param.acp_stream_ep_id = stream->remote_ep != NULL ?
stream->remote_ep->sep.sep_info.id : stream->remote_ep_id;
a2dp->open_param.sep = a2dp->set_config_param.sep;
return bt_avdtp_open(&a2dp->session, &a2dp->open_param);
Expand Down

0 comments on commit 9aeb310

Please sign in to comment.