Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions kernel-src/wolfcrypt_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ static __always_inline bool wc_AesGcm_crypt_sg_inplace(struct scatterlist *src,
if (miter_needs_stop)
sg_miter_stop(&miter);

free(aes);
XFREE(aes, NULL, DYNAMIC_TYPE_TMP_BUFFER);

WC_DEBUG_PR_IF_NEG(ret);

Expand Down Expand Up @@ -447,7 +447,7 @@ static __always_inline bool wc_AesGcm_crypt_sg_inplace(struct scatterlist *src,
else
wc_ForceZero(buf, src_len + WC_AES_BLOCK_SIZE);
}
free(buf);
XFREE(buf, NULL, DYNAMIC_TYPE_TMP_BUFFER);
}

out:
Expand All @@ -456,7 +456,7 @@ static __always_inline bool wc_AesGcm_crypt_sg_inplace(struct scatterlist *src,

out_aes_uninited:

free(aes);
XFREE(aes, NULL, DYNAMIC_TYPE_TMP_BUFFER);

wc_ForceZero(full_nonce, sizeof full_nonce);

Expand Down
2 changes: 1 addition & 1 deletion kernel-src/wolfcrypt_glue.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static inline int wc_sha256_oneshot2(byte *out, const byte *message1, const size
static inline u64 wc_u64_keyed_hash(const byte *key, const size_t key_len, const byte *message, const size_t message_len) {
u64 ret[WC_SHA256_DIGEST_SIZE / sizeof(u64)];
if (wc_sha256_oneshot2((byte *)ret, key, key_len, message, message_len) < 0)
return ~0UL;
return ~(u64)0;
else
return ret[0];
}
Expand Down