if (att_ret == GATT_SUCCESS || att_ret == GATT_CONGESTED) {
sent = TRUE;
p_cmd->to_send = FALSE;
- p_cmd->p_cmd = NULL;
+ if(p_cmd->p_cmd) {
+ osi_free(p_cmd->p_cmd);
+ p_cmd->p_cmd = NULL;
+ }
/* dequeue the request if is write command or sign write */
if (p_cmd->op_code != GATT_CMD_WRITE && p_cmd->op_code != GATT_SIGN_CMD_WRITE) {
GATT_TRACE_DEBUG ("exit gatt_cleanup_upon_disc ");
BTM_Recovery_Pre_State();
}
+ gatt_delete_dev_from_srv_chg_clt_list(bda);
}
/*******************************************************************************
**
if (transport == BT_TRANSPORT_BR_EDR || memcmp(bd_addr, dummy_bda, BD_ADDR_LEN) == 0) {
return;
}
-
+ if(!connected && &p_cb->rsp_timer_ent) {
+ //free timer
+ btu_free_timer(&p_cb->rsp_timer_ent);
+ }
if (memcmp(bd_addr, p_cb->pairing_bda, BD_ADDR_LEN) == 0) {
SMP_TRACE_EVENT ("%s() for pairing BDA: %08x%04x Event: %s\n",
__FUNCTION__,