components/driver/spi_master: free dma descriptors

Signed-off-by: Jeroen Domburg <jeroen@espressif.com>
This commit is contained in:
devsaurus 2017-05-02 22:42:45 +02:00 committed by Jeroen Domburg
parent dfb8aa6257
commit 530c3ca05c

View File

@ -177,6 +177,8 @@ esp_err_t spi_bus_free(spi_host_device_t host)
spihost[host]->hw->slave.trans_done=0; spihost[host]->hw->slave.trans_done=0;
esp_intr_free(spihost[host]->intr); esp_intr_free(spihost[host]->intr);
spicommon_periph_free(host); spicommon_periph_free(host);
free(spihost[host]->dmadesc_tx);
free(spihost[host]->dmadesc_rx);
free(spihost[host]); free(spihost[host]);
spihost[host]=NULL; spihost[host]=NULL;
return ESP_OK; return ESP_OK;