component/bt: Fix gatt clcb use-after-free issue

This commit is contained in:
lly
2020-10-26 20:33:05 +08:00
committed by bot
parent b6e763ac86
commit 5f146455f3

View File

@@ -2341,6 +2341,7 @@ void gatt_cleanup_upon_disc(BD_ADDR bda, UINT16 reason, tBT_TRANSPORT transport)
GATT_TRACE_DEBUG ("found p_clcb conn_id=%d clcb_idx=%d", p_clcb->conn_id, p_clcb->clcb_idx);
if (p_clcb->operation != GATTC_OPTYPE_NONE) {
gatt_end_operation(p_clcb, GATT_ERROR, NULL);
p_clcb = NULL;
}
gatt_clcb_dealloc(p_clcb);
}