Skip to content

Commit 551eb3f

Browse files
committed
wolfcrypt/src/ed25519.c and wolfcrypt/src/hash.c: remove gating around isAllocated XFREE()s in wc_ed25519_free() and wc_HashFree().
1 parent dc2a811 commit 551eb3f

2 files changed

Lines changed: 0 additions & 4 deletions

File tree

wolfcrypt/src/ed25519.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,12 +1047,10 @@ void wc_ed25519_free(ed25519_key* key)
10471047
wc_MemZero_Check(key, sizeof(ed25519_key));
10481048
#endif
10491049

1050-
#ifndef WOLFSSL_NO_MALLOC
10511050
if (isAllocated) {
10521051
XFREE(key, heap, DYNAMIC_TYPE_ED25519);
10531052
(void)heap;
10541053
}
1055-
#endif
10561054

10571055
}
10581056

wolfcrypt/src/hash.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,12 +1172,10 @@ int wc_HashFree(wc_HashAlg* hash, enum wc_HashType type)
11721172
ret = BAD_FUNC_ARG;
11731173
};
11741174

1175-
#ifndef WOLFSSL_NO_MALLOC
11761175
if (isAllocated) {
11771176
XFREE(hash, heap, DYNAMIC_TYPE_HASHES);
11781177
(void)heap;
11791178
}
1180-
#endif
11811179

11821180
return ret;
11831181
}

0 commit comments

Comments
 (0)