Skip to content

Comments

zblue: spp: unregister rfcomm server when sdp register fails#463

Open
expliyh wants to merge 1 commit intoopen-vela:devfrom
expliyh:fix-ag-conn-crash
Open

zblue: spp: unregister rfcomm server when sdp register fails#463
expliyh wants to merge 1 commit intoopen-vela:devfrom
expliyh:fix-ag-conn-crash

Conversation

@expliyh
Copy link
Contributor

@expliyh expliyh commented Feb 13, 2026

bug: v/86062

Rootcause: not unregister rfcomm server when sdp register fails causing memory access after free

bug: v/86062

Rootcause: not unregister rfcomm server when sdp register fails causing memory access after free
Signed-off-by: YuhengLi <liyuheng@xiaomi.com>
ret = bt_sdp_register_service(server->sdp_record);
if (ret < 0) {
// TODO: unregister rfcomm server
BT_LOGE("Failed to register SDP record: %d", ret);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check if it has run to this point.

if (ret < 0) {
// TODO: unregister rfcomm server
BT_LOGE("Failed to register SDP record: %d", ret);
bt_rfcomm_server_unregister(&server->rfcomm_server);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here could fix it when it register fail.

could we find the rootcause why bt_sdp_register_service fail?

it seem to forget free it last time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants