mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 16:30:49 +02:00
dbd495dacb
With WOLFSSL_SMALL_STACK_CACHE, wc_Sha512Free and wc_Sha384Free freed the cached W buffer as DYNAMIC_TYPE_TMP_BUFFER, but it is allocated as DYNAMIC_TYPE_DIGEST in InitSha512_Family/InitSha384 and the Copy functions (the in-Init error cleanup already frees it as DYNAMIC_TYPE_DIGEST). The mismatch is flagged by the memusage test (DHE_RSA TLS1.2 reports Errors: 2) and matters for type-bucketed static memory pools. SHA-256/224 already use DYNAMIC_TYPE_DIGEST consistently. Free W as DYNAMIC_TYPE_DIGEST.