From bbc1c699fc02b3e123fae5c0cbf1a693e2ebca53 Mon Sep 17 00:00:00 2001 From: k-stachowiak Date: Thu, 26 Sep 2019 13:36:54 +0200 Subject: [PATCH] Fix potential resource leak in sslserver2 example --- programs/ssl/ssl_server2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c index e27bbc678..27ffbb930 100644 --- a/programs/ssl/ssl_server2.c +++ b/programs/ssl/ssl_server2.c @@ -721,6 +721,7 @@ static int nss_keylog_export( void *p_expkey, if( fwrite( nss_keylog_line, 1, len, f ) != len ) { ret = -1; + fclose( f ); goto exit; }