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

Commit 9f7d91f0 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski Committed by Automerger Merge Worker
Browse files

Merge "bta_gattc: Fix initialization and free p_q_cmd" am: 6f12000f

parents 32be6413 6f12000f
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));
}