mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 23:45:49 +01:00
Fix resource leak when using mutex and ssl_cookie
When using ssl_cookie with MBEDTLS_THREADING_C, fix a resource leak caused by initiating a mutex in mbedtls_ssl_cookie_free instead of freeing it. Raised and fix suggested by lan Gillingham in the mbed TLS forum Tracked in #771
This commit is contained in:
parent
065cede476
commit
04965edaa8
@ -3,6 +3,7 @@ mbed TLS ChangeLog (Sorted per branch, date)
|
|||||||
= mbed TLS x.x.x branch released xxxx-xx-xx
|
= mbed TLS x.x.x branch released xxxx-xx-xx
|
||||||
|
|
||||||
Bugfix
|
Bugfix
|
||||||
|
<<<<<<< HEAD
|
||||||
* Fix the redefinition of macro ssl_set_bio to an undefined symbol
|
* Fix the redefinition of macro ssl_set_bio to an undefined symbol
|
||||||
mbedtls_ssl_set_bio_timeout in compat-1.3.h, by removing it.
|
mbedtls_ssl_set_bio_timeout in compat-1.3.h, by removing it.
|
||||||
Found by omlib-lin. #673
|
Found by omlib-lin. #673
|
||||||
@ -17,6 +18,8 @@ Bugfix
|
|||||||
* Fixed the templates used to generate project and solution files for Visual
|
* Fixed the templates used to generate project and solution files for Visual
|
||||||
Studio 2015 as well as the files themselves, to remove a build warning
|
Studio 2015 as well as the files themselves, to remove a build warning
|
||||||
generated in Visual Studio 2015. Reported by Steve Valliere. #742
|
generated in Visual Studio 2015. Reported by Steve Valliere. #742
|
||||||
|
* Fix a resource leak in ssl_cookie, when using MBEDTLS_THREADING_C.
|
||||||
|
Raised and fix suggested by Alan Gillingham in the mbed TLS forum. #771
|
||||||
|
|
||||||
= mbed TLS 2.4.1 branch released 2016-12-13
|
= mbed TLS 2.4.1 branch released 2016-12-13
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ void mbedtls_ssl_cookie_free( mbedtls_ssl_cookie_ctx *ctx )
|
|||||||
mbedtls_md_free( &ctx->hmac_ctx );
|
mbedtls_md_free( &ctx->hmac_ctx );
|
||||||
|
|
||||||
#if defined(MBEDTLS_THREADING_C)
|
#if defined(MBEDTLS_THREADING_C)
|
||||||
mbedtls_mutex_init( &ctx->mutex );
|
mbedtls_mutex_free( &ctx->mutex );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mbedtls_zeroize( ctx, sizeof( mbedtls_ssl_cookie_ctx ) );
|
mbedtls_zeroize( ctx, sizeof( mbedtls_ssl_cookie_ctx ) );
|
||||||
|
Loading…
Reference in New Issue
Block a user