From c3f4a97b8fd7113f22a23c56035021fe5f3015a3 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Fri, 14 May 2021 14:54:24 +0100 Subject: [PATCH] Don't infer last element of SSL session cache twice Signed-off-by: Hanno Becker --- library/ssl_cache.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/library/ssl_cache.c b/library/ssl_cache.c index cdefa01b3..367edf51d 100644 --- a/library/ssl_cache.c +++ b/library/ssl_cache.c @@ -151,14 +151,11 @@ static int ssl_cache_pick_writing_slot( mbedtls_ssl_cache_context *cache, while( cur != NULL ) { count++; - if( session_id_len == cur->session_id_len && memcmp( session_id, cur->session_id, cur->session_id_len ) == 0 ) { goto found; } - - last = cur; cur = cur->next; }