From 6b875fc7e5c1abeec3fb62a0c5fe6204bf5c1923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 17 Oct 2014 14:02:33 +0200 Subject: [PATCH] Fix potential memory leak (from clang-analyzer) --- library/ssl_tls.c | 1 + 1 file changed, 1 insertion(+) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index f42a56058..454916135 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -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 ); }