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
Loading
Please register or sign in to comment