diff --git a/components/sx127x_driver/sx127x_driver.c b/components/sx127x_driver/sx127x_driver.c index a57f859..5f53aa6 100644 --- a/components/sx127x_driver/sx127x_driver.c +++ b/components/sx127x_driver/sx127x_driver.c @@ -137,6 +137,8 @@ esp_err_t sx127x_free(sx127x_t *hndl) { ret = spi_bus_free(hndl->config.spi_host); SX127X_ERROR_CHECK2(ret, spi_bus_free) + vSemaphoreDelete(hndl->spi_mutex); + free(hndl); return ESP_OK; @@ -368,6 +370,9 @@ esp_err_t sx127x_stop(sx127x_t *hndl) { } hndl->task_handle = NULL; + vQueueDelete(hndl->rx_packet_queue); + vQueueDelete(hndl->tx_packet_queue); + return ESP_OK; }