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.

(cherry picked from commit 6fad658)

Original-Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
GitOrigin-RevId: 6fad658
Change-Id: I5395a10a449c6ff73dbd5d1b6406adaa0522f8ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5680117
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
  • Loading branch information
lylezhu2012 authored and Chromeos LUCI committed Jul 5, 2024
1 parent 1de43ab commit f1d0f5c
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 @@ -747,7 +747,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 f1d0f5c

Please sign in to comment.