From ce9e3a92fe3db6f20b267005e9f12b3e6ffbd389 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 19 Jul 2021 17:38:09 +0200 Subject: [PATCH] Remove redundant null check mbedtls_cipher_info_get_xxx has well-defined behavior on NULL, so no need to check first. Signed-off-by: Gilles Peskine --- library/ssl_ticket.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/library/ssl_ticket.c b/library/ssl_ticket.c index db2bb52b34..e998111d93 100644 --- a/library/ssl_ticket.c +++ b/library/ssl_ticket.c @@ -138,8 +138,6 @@ int mbedtls_ssl_ticket_setup( mbedtls_ssl_ticket_context *ctx, ctx->ticket_lifetime = lifetime; cipher_info = mbedtls_cipher_info_from_type( cipher); - if( cipher_info == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); if( mbedtls_cipher_info_get_mode( cipher_info ) != MBEDTLS_MODE_GCM && mbedtls_cipher_info_get_mode( cipher_info ) != MBEDTLS_MODE_CCM )