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:
parent
8ebfe084ab
commit
14b16c62e9
4 changed files with 9 additions and 12 deletions
|
@ -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 );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue