* lib/sha3.c (sha3_free_ctx): Preserve errno.
* modules/crypto/sha3 (Depends-on):
* modules/crypto/sha3-buffer (Depends-on):
Depend on free-posix.
2026-02-22 Paul Eggert <eggert@cs.ucla.edu>
+ crypto/sha3: fix errno when freeing
+ * lib/sha3.c (sha3_free_ctx): Preserve errno.
+ * modules/crypto/sha3 (Depends-on):
+ * modules/crypto/sha3-buffer (Depends-on):
+ Depend on free-posix.
+
crypto/sha3: fix memory leak with OpenSSL wrapper
* lib/sha3.c (sha3_##SIZE##_buffer):
Free ctx before returning.
{
if (ctx->evp_ctx != NULL)
{
+ int saved_errno = errno;
EVP_MD_CTX_free (ctx->evp_ctx);
ctx->evp_ctx = NULL;
+ errno = saved_errno;
}
}
Depends-on:
crypto/af_alg
crypto/sha3-buffer
+free-posix
configure.ac:
bool
byteswap
c99
+free-posix
stddef-h
stdint-h
u64