mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-22 22:51:05 +00:00
Fix potential memory leak (from clang-analyzer)
This commit is contained in:
parent
7498f0da0a
commit
6b875fc7e5
|
@ -2197,6 +2197,7 @@ static int ssl_flight_append( ssl_context *ssl )
|
||||||
if( ( msg->p = polarssl_malloc( ssl->out_msglen ) ) == NULL )
|
if( ( msg->p = polarssl_malloc( ssl->out_msglen ) ) == NULL )
|
||||||
{
|
{
|
||||||
SSL_DEBUG_MSG( 1, ( "malloc %d bytes failed", ssl->out_msglen ) );
|
SSL_DEBUG_MSG( 1, ( "malloc %d bytes failed", ssl->out_msglen ) );
|
||||||
|
polarssl_free( msg );
|
||||||
return( POLARSSL_ERR_SSL_MALLOC_FAILED );
|
return( POLARSSL_ERR_SSL_MALLOC_FAILED );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue