From ec4b08957f1947daf98c1e97918510dce68db538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 12 May 2015 12:22:36 +0200 Subject: [PATCH] Fix issue in ssl_free() vs ssl_config_free() Just an overlook from moving things recently --- library/ssl_tls.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 73c3a746c..227476a22 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -6570,14 +6570,6 @@ void mbedtls_ssl_free( mbedtls_ssl_context *ssl ) mbedtls_free( ssl->session ); } -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - if( ssl->conf->ticket_keys ) - { - ssl_ticket_keys_free( ssl->conf->ticket_keys ); - mbedtls_free( ssl->conf->ticket_keys ); - } -#endif - #if defined(MBEDTLS_X509_CRT_PARSE_C) if( ssl->hostname != NULL ) { @@ -6733,6 +6725,14 @@ void mbedtls_ssl_config_free( mbedtls_ssl_config *conf ) } #endif +#if defined(MBEDTLS_SSL_SESSION_TICKETS) + if( conf->ticket_keys ) + { + ssl_ticket_keys_free( conf->ticket_keys ); + mbedtls_free( conf->ticket_keys ); + } +#endif + #if defined(MBEDTLS_X509_CRT_PARSE_C) ssl_key_cert_free( conf->key_cert ); #endif