component/bt: Fix the bug when write ccc sometimes will lead to repeatedly release the memory. See merge request !1599