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 #74732.

Signed-off-by: Lyle Zhu <[email protected]>
  • Loading branch information
lylezhu2012 committed Jul 3, 2024
1 parent 012520d commit f23a048
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 @@ -749,7 +749,7 @@ int bt_a2dp_stream_start(struct bt_a2dp_stream *stream)

a2dp = stream->a2dp;
a2dp->start_param.req.func = bt_a2dp_start_cb;
a2dp->start_param.acp_stream_ep_id = stream->remote_ep == NULL ?
a2dp->start_param.acp_stream_ep_id = stream->remote_ep != NULL ?
stream->remote_ep->sep.sep_info.id : stream->remote_ep_id;
a2dp->start_param.sep = &stream->local_ep->sep;
return bt_avdtp_start(&a2dp->session, &a2dp->start_param);
Expand Down

0 comments on commit f23a048

Please sign in to comment.