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

Commit 70ce9f05 authored by Kyunglyul Hyun's avatar Kyunglyul Hyun Committed by Gerrit Code Review
Browse files

Merge "Prevent premature freeing of queued GATT command" into main

parents 4b4907b6 01416eb6
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);
  }