diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index 8f0d3b501..c188900b4 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -619,6 +619,7 @@ static int nss_keylog_export( void *p_expkey, if( fwrite( nss_keylog_line, 1, len, f ) != len ) { ret = -1; + fclose( f ); goto exit; }