diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index abe004cc10..fa20c7f426 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -769,7 +769,6 @@ struct _ssl_key_cert { x509_crt *cert; /*!< cert */ pk_context *key; /*!< private key */ - int key_own_alloc; /*!< did we allocate key? */ ssl_key_cert *next; /*!< next key/cert pair */ }; #endif /* POLARSSL_X509_CRT_PARSE_C */ diff --git a/library/ssl_tls.c b/library/ssl_tls.c index e87731535d..fb943dc506 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -6507,14 +6507,7 @@ static void ssl_key_cert_free( ssl_key_cert *key_cert ) while( cur != NULL ) { next = cur->next; - - if( cur->key_own_alloc ) - { - pk_free( cur->key ); - polarssl_free( cur->key ); - } polarssl_free( cur ); - cur = next; } }