Merge pull request #3913 from jarvte/memfix_variablebuffer

Fix possible memory leak when MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH defined
This commit is contained in:
Andrzej Kurek 2020-11-25 09:45:53 -05:00 committed by GitHub
commit 1c448168b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12709,6 +12709,7 @@ void mbedtls_ssl_free( mbedtls_ssl_context *ssl )
#endif
mbedtls_platform_zeroize( ssl->out_buf, out_buf_len );
mbedtls_free( ssl->out_buf );
ssl->out_buf = NULL;
}
if( ssl->in_buf != NULL )
@ -12720,6 +12721,7 @@ void mbedtls_ssl_free( mbedtls_ssl_context *ssl )
#endif
mbedtls_platform_zeroize( ssl->in_buf, in_buf_len );
mbedtls_free( ssl->in_buf );
ssl->in_buf = NULL;
}
#if defined(MBEDTLS_ZLIB_SUPPORT)