Component/bt: fix memory leak in service change

This commit is contained in:
zhiweijian 2018-11-12 19:41:19 +08:00
parent a4357aed91
commit 1f7c54ae85

View File

@ -188,6 +188,8 @@ void gatt_free(void)
#if (GATTS_INCLUDED == TRUE)
for (i = 0; i < GATT_MAX_SR_PROFILES; i++) {
gatt_remove_an_item_from_list(&gatt_cb.hdl_list_info, &gatt_cb.hdl_list[i]);
gatt_free_attr_value_buffer(&gatt_cb.hdl_list[i]);
gatt_free_hdl_buffer(&gatt_cb.hdl_list[i]);
}
#endif /* #if (GATTS_INCLUDED == TRUE) */