ssl_init() left a dirty in_ctr pointer on failed allocation of out_ctr

This commit is contained in:
Paul Bakker 2014-03-17 13:41:51 +01:00
parent a9f86e03ed
commit b000f82d76
2 changed files with 3 additions and 0 deletions

View file

@ -33,6 +33,8 @@ Bugfix
* Fixed CMake symlinking on out-of-source builds
* Bignum's MIPS-32 assembly was used on MIPS-64, causing chaos. (Found by
Alex Wilson.)
* ssl_init() was leaving a dirty pointer in ssl_context if malloc of
out_ctr failed
= Version 1.2.10 released 2013-10-07
Changes

View file

@ -3051,6 +3051,7 @@ int ssl_init( ssl_context *ssl )
{
SSL_DEBUG_MSG( 1, ( "malloc(%d bytes) failed", len ) );
free( ssl-> in_ctr );
ssl->in_ctr = NULL;
return( POLARSSL_ERR_SSL_MALLOC_FAILED );
}