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 <esyr@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Wed Feb 25 11:10:41 2026
(Merged from https://github.com/openssl/openssl/pull/30139)
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;