From: Eugene Syromiatnikov Date: Mon, 23 Feb 2026 03:33:07 +0000 (+0100) Subject: ssl/ech/ech_internal.c: avoid superfluous extval check in ossl_ech_early_decrypt X-Git-Tag: openssl-4.0.0-alpha1~114 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8abd64ab61e9ba59539b5bee3e53266ac662172f;p=thirdparty%2Fopenssl.git ssl/ech/ech_internal.c: avoid superfluous extval check in ossl_ech_early_decrypt Remove superfluous extval NULL check on success path, as it cannot be NULL, and is already dereferenced earlier. Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1681447 Fixes: 6c3edd4f3a8a "Add server-side handling of Encrypted Client Hello" Signed-off-by: Eugene Syromiatnikov Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz MergeDate: Wed Feb 25 11:10:41 2026 (Merged from https://github.com/openssl/openssl/pull/30139) --- diff --git a/ssl/ech/ech_internal.c b/ssl/ech/ech_internal.c index fbc6c5bbf69..3ae7e89a95b 100644 --- a/ssl/ech/ech_internal.c +++ b/ssl/ech/ech_internal.c @@ -2083,11 +2083,9 @@ int ossl_ech_early_decrypt(SSL_CONNECTION *s, PACKET *outerpkt, PACKET *newpkt) ossl_ech_pbuf("clear", clear, clearlen); } #endif - if (extval != NULL) { - ossl_ech_encch_free(extval); - OPENSSL_free(extval); - extval = NULL; - } + ossl_ech_encch_free(extval); + OPENSSL_free(extval); + extval = NULL; if (s->ext.ech.grease == OSSL_ECH_IS_GREASE) { OPENSSL_free(clear); return 1;