mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Minor optimizations (original by Peter Vaskovic, modified by Paul Bakker)
Move strlen out of for loop. Remove redundant null checks before free.
This commit is contained in:
@ -321,8 +321,7 @@ void ssl_cache_free( ssl_cache_context *cache )
|
||||
ssl_session_free( &prv->session );
|
||||
|
||||
#if defined(POLARSSL_X509_CRT_PARSE_C)
|
||||
if( prv->peer_cert.p != NULL )
|
||||
polarssl_free( prv->peer_cert.p );
|
||||
polarssl_free( prv->peer_cert.p );
|
||||
#endif /* POLARSSL_X509_CRT_PARSE_C */
|
||||
|
||||
polarssl_free( prv );
|
||||
|
Reference in New Issue
Block a user