mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
ssl_init() left a dirty in_ctr pointer on failed allocation of out_ctr
This commit is contained in:
@ -3427,7 +3427,8 @@ int ssl_init( ssl_context *ssl )
|
||||
if( ssl->out_ctr == NULL )
|
||||
{
|
||||
SSL_DEBUG_MSG( 1, ( "malloc(%d bytes) failed", len ) );
|
||||
polarssl_free( ssl-> in_ctr );
|
||||
polarssl_free( ssl->in_ctr );
|
||||
ssl->in_ctr = NULL;
|
||||
return( POLARSSL_ERR_SSL_MALLOC_FAILED );
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user