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

Commit 742b5354 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "bta_gattc: Fix initialization and free p_q_cmd" into tm-qpr-dev am: 2252d4a5

parents 822123fe 2252d4a5
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -146,6 +146,7 @@ tBTA_GATTC_CLCB* bta_gattc_clcb_alloc(tGATT_IF client_if,
      p_clcb->status = GATT_SUCCESS;
      p_clcb->transport = transport;
      p_clcb->bda = remote_bda;
      p_clcb->p_q_cmd = NULL;

      p_clcb->p_rcb = bta_gattc_cl_get_regcb(client_if);

@@ -217,7 +218,9 @@ void bta_gattc_clcb_dealloc(tBTA_GATTC_CLCB* p_clcb) {
    p_srcb->gatt_database.Clear();
  }

  if (p_clcb->p_q_cmd != NULL) {
    osi_free_and_reset((void**)&p_clcb->p_q_cmd);
  }
  memset(p_clcb, 0, sizeof(tBTA_GATTC_CLCB));
}