Skip to content

Commit 1614e71

Browse files
author
Zhou Xiao
committed
fix(ble): set timer handle to null after deletion
1 parent 6cd14c1 commit 1614e71

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/bt/common/ble_log/ble_log_spi_out.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,7 @@ static int spi_out_ts_sync_init(void)
718718
gpio_init_failed:
719719
#if !SPI_OUT_TS_SYNC_SLEEP_SUPPORT
720720
esp_timer_delete(ts_sync_timer);
721+
ts_sync_timer = NULL;
721722
timer_init_failed:
722723
#endif // !SPI_OUT_TS_SYNC_SLEEP_SUPPORT
723724
return -1;
@@ -733,6 +734,7 @@ static void spi_out_ts_sync_deinit(void)
733734
// Deinitialize timestamp synchronizer
734735
esp_timer_stop(ts_sync_timer);
735736
esp_timer_delete(ts_sync_timer);
737+
ts_sync_timer = NULL;
736738
#endif // !SPI_OUT_TS_SYNC_SLEEP_SUPPORT
737739

738740
// Deinitialize sync IO
@@ -959,6 +961,7 @@ void ble_log_spi_out_deinit(void)
959961
#if SPI_OUT_FLUSH_TIMER_ENABLED
960962
esp_timer_stop(flush_timer);
961963
esp_timer_delete(flush_timer);
964+
flush_timer = NULL;
962965
#endif // SPI_OUT_FLUSH_TIMER_ENABLED
963966

964967
// Drain all queued transactions

0 commit comments

Comments
 (0)