component/bt: fix crash when BLE do SMP connect and disconnect stress test See merge request idf/esp-idf!3077