From: Daniel Fiala Date: Fri, 21 Oct 2022 06:23:54 +0000 (+0200) Subject: Fix coverity 1516101 deadcode X-Git-Tag: openssl-3.2.0-alpha1~1848 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ccccb26d6de39eced5b16ffce6040c9547bfe74;p=thirdparty%2Fopenssl.git Fix coverity 1516101 deadcode Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/19464) --- diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c index 096c8ce561a..83ef67275eb 100644 --- a/ssl/d1_lib.c +++ b/ssl/d1_lib.c @@ -454,8 +454,10 @@ int DTLSv1_listen(SSL *ssl, BIO_ADDR *client) if (buf == NULL) return -1; wbuf = OPENSSL_malloc(DTLS1_RT_HEADER_LENGTH + SSL3_RT_MAX_PLAIN_LENGTH); - if (buf == NULL) + if (wbuf == NULL) { + OPENSSL_free(buf); return -1; + } do { /* Get a packet */