Skip to content

Commit e0e4c0e

Browse files
committed
ccan: call mbedtls_sha256_free in sha256_done
1 parent 9f5c588 commit e0e4c0e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ccan/ccan/crypto/sha256/sha256.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ inline void sha256_update(struct sha256_ctx *ctx, const void *p, size_t size)
5959
inline void sha256_done(struct sha256_ctx *ctx, struct sha256* res)
6060
{
6161
mbedtls_sha256_finish(&ctx->c, res->u.u8);
62+
mbedtls_sha256_free(&ctx->c);
6263
}
6364
void sha256_optimize(void)
6465
{

0 commit comments

Comments
 (0)