Fix coverity 1516101 deadcode

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)
This commit is contained in:
Daniel Fiala 2022-10-21 08:23:54 +02:00 committed by Pauli
parent 4f32754f79
commit 7ccccb26d6

View 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 */