Skip to content

Commit

Permalink
src/internal.c: in HashSkeData(), remove unneeded logically faulty nu…
Browse files Browse the repository at this point in the history
…llness check around XFREE(ssl->buffers.digest.buffer, ...).
  • Loading branch information
douzzer committed Dec 6, 2024
1 parent 0381a47 commit 0ad072a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 0ad072a

Please sign in to comment.