Fix potential memory leak (from clang-analyzer)

This commit is contained in:
Manuel Pégourié-Gonnard 2014-10-17 14:02:33 +02:00 committed by Paul Bakker
parent 7498f0da0a
commit 6b875fc7e5

View file

@ -2197,6 +2197,7 @@ static int ssl_flight_append( ssl_context *ssl )
if( ( msg->p = polarssl_malloc( ssl->out_msglen ) ) == NULL )
{
SSL_DEBUG_MSG( 1, ( "malloc %d bytes failed", ssl->out_msglen ) );
polarssl_free( msg );
return( POLARSSL_ERR_SSL_MALLOC_FAILED );
}