diff --git a/components/bt/bluedroid/bta/gatt/bta_gattc_cache.c b/components/bt/bluedroid/bta/gatt/bta_gattc_cache.c index 5e0943a9bb..d9f67ef209 100644 --- a/components/bt/bluedroid/bta/gatt/bta_gattc_cache.c +++ b/components/bt/bluedroid/bta/gatt/bta_gattc_cache.c @@ -187,6 +187,7 @@ tBTA_GATT_STATUS bta_gattc_init_cache(tBTA_GATTC_SERV *p_srvc_cb) p_srvc_cb->cur_srvc_idx = 0; p_srvc_cb->cur_char_idx = 0; p_srvc_cb->next_avail_idx = 0; + p_srvc_cb->total_attr = 0; } return BTA_GATT_OK;