mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-31 10:20:45 +00:00
Don't infer last element of SSL session cache twice
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
This commit is contained in:
parent
466ed6fd08
commit
c3f4a97b8f
@ -151,14 +151,11 @@ static int ssl_cache_pick_writing_slot( mbedtls_ssl_cache_context *cache,
|
|||||||
while( cur != NULL )
|
while( cur != NULL )
|
||||||
{
|
{
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
if( session_id_len == cur->session_id_len &&
|
if( session_id_len == cur->session_id_len &&
|
||||||
memcmp( session_id, cur->session_id, cur->session_id_len ) == 0 )
|
memcmp( session_id, cur->session_id, cur->session_id_len ) == 0 )
|
||||||
{
|
{
|
||||||
goto found;
|
goto found;
|
||||||
}
|
}
|
||||||
|
|
||||||
last = cur;
|
|
||||||
cur = cur->next;
|
cur = cur->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user