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

Commit c49592a0 authored by Kyunglyul Hyun's avatar Kyunglyul Hyun Committed by Automerger Merge Worker
Browse files

Merge "Prevent premature freeing of queued GATT command" into main am: 70ce9f05 am: ad4b8246

parents 65bb8af9 ad4b8246
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -972,7 +972,9 @@ void bta_gattc_disc_cmpl(tBTA_GATTC_CLCB* p_clcb,
     * want to free the underlying buffer that's being
     * referenced by p_clcb->p_q_cmd
     */
    if (p_q_cmd != p_clcb->p_q_cmd) osi_free_and_reset((void**)&p_q_cmd);
    if (!bta_gattc_is_data_queued(p_clcb, p_q_cmd)) {
      osi_free_and_reset((void**)&p_q_cmd);
    }
  } else {
    bta_gattc_continue(p_clcb);
  }