mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 12:05:36 +01:00
Fixed memory leak in ssl_free() and ssl_reset() for active session
This commit is contained in:
parent
c7a2da437e
commit
c0463502ff
@ -1,5 +1,9 @@
|
|||||||
PolarSSL ChangeLog
|
PolarSSL ChangeLog
|
||||||
|
|
||||||
|
= Master
|
||||||
|
Bugfix
|
||||||
|
* Fixed memory leak in ssl_free() and ssl_reset() for active session
|
||||||
|
|
||||||
= Version 1.2.5 released 2013-02-02
|
= Version 1.2.5 released 2013-02-02
|
||||||
Changes
|
Changes
|
||||||
* Allow enabling of dummy error_strerror() to support some use-cases
|
* Allow enabling of dummy error_strerror() to support some use-cases
|
||||||
|
@ -3025,6 +3025,13 @@ int ssl_session_reset( ssl_context *ssl )
|
|||||||
ssl->transform = NULL;
|
ssl->transform = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( ssl->session )
|
||||||
|
{
|
||||||
|
ssl_session_free( ssl->session );
|
||||||
|
free( ssl->session );
|
||||||
|
ssl->session = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if( ( ret = ssl_handshake_init( ssl ) ) != 0 )
|
if( ( ret = ssl_handshake_init( ssl ) ) != 0 )
|
||||||
return( ret );
|
return( ret );
|
||||||
|
|
||||||
@ -3891,6 +3898,12 @@ void ssl_free( ssl_context *ssl )
|
|||||||
free( ssl->session_negotiate );
|
free( ssl->session_negotiate );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( ssl->session )
|
||||||
|
{
|
||||||
|
ssl_session_free( ssl->session );
|
||||||
|
free( ssl->session );
|
||||||
|
}
|
||||||
|
|
||||||
if ( ssl->hostname != NULL)
|
if ( ssl->hostname != NULL)
|
||||||
{
|
{
|
||||||
memset( ssl->hostname, 0, ssl->hostname_len );
|
memset( ssl->hostname, 0, ssl->hostname_len );
|
||||||
|
Loading…
Reference in New Issue
Block a user