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.

(cherry picked from commit 8276d4f)

Original-Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
GitOrigin-RevId: 8276d4f
Change-Id: I1181bb67de74a3b7003b4f1ad3b894365faa6801
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5680118
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 f1d0f5c commit eaa4c8c
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 @@ -725,7 +725,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 eaa4c8c

Please sign in to comment.