altcp: Fix memory leak in altcp_tls_free_config

Reported in bug #59032 by Ondrej Lufinka,
fix suggested by David GIRAULT.
This commit is contained in:
Erik Ekman 2021-01-13 22:02:35 +01:00
parent ecab77654a
commit b5618c51ca

View File

@ -1042,6 +1042,7 @@ altcp_tls_free_config(struct altcp_tls_config *conf)
if (conf->ca) { if (conf->ca) {
mbedtls_x509_crt_free(conf->ca); mbedtls_x509_crt_free(conf->ca);
} }
mbedtls_ssl_config_free(&conf->conf)
altcp_mbedtls_free_config(conf); altcp_mbedtls_free_config(conf);
altcp_mbedtls_unref_entropy(); altcp_mbedtls_unref_entropy();
} }