]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix coverity 1516101 deadcode
authorDaniel Fiala <daniel@openssl.org>
Fri, 21 Oct 2022 06:23:54 +0000 (08:23 +0200)
committerPauli <pauli@openssl.org>
Sun, 23 Oct 2022 22:51:00 +0000 (09:51 +1100)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19464)

ssl/d1_lib.c

index 096c8ce561a978b3e3bc3c228476f66914c61da8..83ef67275ebc81c4a734c63ac622488a0238df0e 100644 (file)
@@ -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 */