mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-06-03 14:38:23 +00:00
Fix possible memory leak when MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH is defined
Signed-off-by: Teppo Järvelin <teppo.jarvelin@arm.com>
This commit is contained in:
parent
560203ae01
commit
b89cf99a57
|
@ -12709,6 +12709,7 @@ void mbedtls_ssl_free( mbedtls_ssl_context *ssl )
|
||||||
#endif
|
#endif
|
||||||
mbedtls_platform_zeroize( ssl->out_buf, out_buf_len );
|
mbedtls_platform_zeroize( ssl->out_buf, out_buf_len );
|
||||||
mbedtls_free( ssl->out_buf );
|
mbedtls_free( ssl->out_buf );
|
||||||
|
ssl->out_buf = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ssl->in_buf != NULL )
|
if( ssl->in_buf != NULL )
|
||||||
|
@ -12720,6 +12721,7 @@ void mbedtls_ssl_free( mbedtls_ssl_context *ssl )
|
||||||
#endif
|
#endif
|
||||||
mbedtls_platform_zeroize( ssl->in_buf, in_buf_len );
|
mbedtls_platform_zeroize( ssl->in_buf, in_buf_len );
|
||||||
mbedtls_free( ssl->in_buf );
|
mbedtls_free( ssl->in_buf );
|
||||||
|
ssl->in_buf = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(MBEDTLS_ZLIB_SUPPORT)
|
#if defined(MBEDTLS_ZLIB_SUPPORT)
|
||||||
|
|
Loading…
Reference in a new issue