diff --git a/components/esp_hw_support/port/esp32s2/esp_ds.c b/components/esp_hw_support/port/esp32s2/esp_ds.c index f7e2b9564d..635e83e2a2 100644 --- a/components/esp_hw_support/port/esp32s2/esp_ds.c +++ b/components/esp_hw_support/port/esp32s2/esp_ds.c @@ -129,6 +129,7 @@ esp_err_t esp_ds_start_sign(const void *message, if (result == ETS_DS_INVALID_KEY) { ds_disable_release(); + free(context); return ESP_ERR_HW_CRYPTO_DS_INVALID_KEY; }