mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
fix(console): delete state_mux when REPL creation fails
This commit is contained in:
@@ -334,6 +334,10 @@ esp_err_t esp_console_new_repl_stdio(const esp_console_repl_config_t *repl_confi
|
||||
_exit:
|
||||
if (universal_repl) {
|
||||
esp_console_deinit();
|
||||
/* Only common_deinit() deletes state_mux, and the weak set_event_fd() never creates it. */
|
||||
if (universal_repl->repl_com.state_mux) {
|
||||
vSemaphoreDelete(universal_repl->repl_com.state_mux);
|
||||
}
|
||||
free(universal_repl);
|
||||
}
|
||||
if (ret_repl) {
|
||||
|
||||
@@ -152,6 +152,10 @@ static esp_err_t esp_console_new_repl_uart_legacy(const esp_console_dev_uart_con
|
||||
_exit:
|
||||
if (uart_repl) {
|
||||
esp_console_deinit();
|
||||
/* Only common_deinit() deletes state_mux, and the weak set_event_fd() never creates it. */
|
||||
if (uart_repl->repl_com.state_mux) {
|
||||
vSemaphoreDelete(uart_repl->repl_com.state_mux);
|
||||
}
|
||||
free(uart_repl);
|
||||
}
|
||||
if (ret_repl) {
|
||||
|
||||
Reference in New Issue
Block a user