Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 01416eb6 authored by Kyunglyul Hyun's avatar Kyunglyul Hyun
Browse files

Prevent premature freeing of queued GATT command

In bta_gattc_disc_cmpl, ensure that a queued command is not freed
before it is fully handled.
This prevents a potential crash caused by accessing a freed command.

Before this change, it only checked p_q_cmd to detect if
the command is queued but in bta_gattc_cfg_mtu,
the command is enqueued to p_q_cmd_queue,
and p_q_cmd remains NULL, so it failed to check
and freed the command

Bug: 315905939
Test: atest BluetoothInstrumentationTests
Test: manually connect multiple clients simultaneously
Flag: EXEMPT strict checking
Change-Id: I619e668c5d8831d857a032abeb63a159a1cb41f9
parent f9e41790
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment