diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 93d5b56e6e..def073b86a 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -2050,9 +2050,10 @@ void ssl_free( ssl_context *ssl ) ssl->hostname_len = 0; } - memset( ssl, 0, sizeof( ssl_context ) ); - SSL_DEBUG_MSG( 2, ( "<= free" ) ); + + /* Actually free after last debug message */ + memset( ssl, 0, sizeof( ssl_context ) ); } #endif