altcp_tls_mbedtls: ensure configuration is properly freed

This commit is contained in:
David Girault 2018-05-22 09:47:44 +02:00 committed by Simon Goldschmidt
parent 44a3f631b3
commit d84a84e5ca

View File

@ -972,6 +972,8 @@ altcp_tls_free_config(struct altcp_tls_config *conf)
if (conf->ca) {
mbedtls_x509_crt_free(conf->ca);
}
mbedtls_entropy_free(&conf->entropy);
mbedtls_ctr_drbg_free(&conf->ctr_drbg);
altcp_mbedtls_free_config(conf);
if (altcp_tls_entropy_rng && altcp_tls_entropy_rng->ref)
altcp_tls_entropy_rng->ref--;