OSDN Git Service

DO NOT MERGE Fix unexpected behavior in SDP
[android-x86/system-bt.git] / stack / gatt / gatt_utils.c
index 0f722cc..c2db770 100644 (file)
@@ -972,7 +972,6 @@ tGATT_TCB * gatt_allocate_tcb_by_bdaddr(BD_ADDR bda, tBT_TRANSPORT transport)
             p_tcb->pending_ind_q = fixed_queue_new(SIZE_MAX);
             p_tcb->conf_timer = alarm_new("gatt.conf_timer");
             p_tcb->ind_ack_timer = alarm_new("gatt.ind_ack_timer");
-            p_tcb->sr_cmd.multi_rsp_q = fixed_queue_new(SIZE_MAX);
             p_tcb->in_use = TRUE;
             p_tcb->tcb_idx = i;
             p_tcb->transport = transport;
@@ -2285,6 +2284,7 @@ void gatt_cleanup_upon_disc(BD_ADDR bda, UINT16 reason, tBT_TRANSPORT transport)
         gatt_free_pending_ind(p_tcb);
         gatt_free_pending_enc_queue(p_tcb);
         fixed_queue_free(p_tcb->sr_cmd.multi_rsp_q, NULL);
+        p_tcb->sr_cmd.multi_rsp_q = NULL;
 
         for (i = 0; i < GATT_MAX_APPS; i ++)
         {