From ec8268d86383c5a77ecdba6461379257e1d96395 Mon Sep 17 00:00:00 2001 From: Mahavir Jain Date: Sun, 2 Jul 2023 19:42:03 +0530 Subject: [PATCH] fix(mbedtls): Build issue in dynamic buffer feature Fix build issue in mbedTLS dynamic buffer feature with `CONFIG_MBEDTLS_DHM_C` enabled case. Closes https://github.com/espressif/esp-idf/issues/11770 --- components/mbedtls/port/dynamic/esp_mbedtls_dynamic_impl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/mbedtls/port/dynamic/esp_mbedtls_dynamic_impl.c b/components/mbedtls/port/dynamic/esp_mbedtls_dynamic_impl.c index fb9c93bdcf..a5ea9fb337 100644 --- a/components/mbedtls/port/dynamic/esp_mbedtls_dynamic_impl.c +++ b/components/mbedtls/port/dynamic/esp_mbedtls_dynamic_impl.c @@ -474,8 +474,8 @@ void esp_mbedtls_free_dhm(mbedtls_ssl_context *ssl) { #ifdef CONFIG_MBEDTLS_DHM_C const mbedtls_ssl_config *conf = mbedtls_ssl_context_get_config(ssl); - mbedtls_mpi_free((mbedtls_mpi *)conf->MBEDTLS_PRIVATE(dhm_P)); - mbedtls_mpi_free((mbedtls_mpi *)conf->MBEDTLS_PRIVATE(dhm_G)); + mbedtls_mpi_free((mbedtls_mpi *)&conf->MBEDTLS_PRIVATE(dhm_P)); + mbedtls_mpi_free((mbedtls_mpi *)&conf->MBEDTLS_PRIVATE(dhm_G)); #endif /* CONFIG_MBEDTLS_DHM_C */ }