From 0ad072a34b68cd50da2739ee626b8162ca8a86e8 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Fri, 6 Dec 2024 13:01:10 -0600 Subject: [PATCH] src/internal.c: in HashSkeData(), remove unneeded logically faulty nullness check around XFREE(ssl->buffers.digest.buffer, ...). --- src/internal.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/internal.c b/src/internal.c index 10e5867b6b..f8d014b30d 100644 --- a/src/internal.c +++ b/src/internal.c @@ -29851,11 +29851,9 @@ static int HashSkeData(WOLFSSL* ssl, enum wc_HashType hashType, ssl->buffers.digest.length = (unsigned int)digest_sz; /* buffer for hash */ - if (!ssl->buffers.digest.buffer) { - if (!ssl->options.dontFreeDigest) { - XFREE(ssl->buffers.digest.buffer, ssl->heap, - DYNAMIC_TYPE_DIGEST); - } + if (!ssl->options.dontFreeDigest) { + XFREE(ssl->buffers.digest.buffer, ssl->heap, + DYNAMIC_TYPE_DIGEST); } ssl->options.dontFreeDigest = 0;