Skip to content

Commit 827516c

Browse files
authored
Merge pull request #8636 from douzzer/20250403-linuxkm-lkcapi-fixes
20250403-linuxkm-lkcapi-fixes
2 parents 47ed447 + 2c001cc commit 827516c

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

linuxkm/lkcapi_glue.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ static int km_AesGet(struct km_AesCtx *ctx, int decrypt_p, int copy_p, Aes **aes
485485
if (aes_copy == NULL)
486486
return -ENOMEM;
487487
XMEMCPY(aes_copy, ret, sizeof(Aes));
488-
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_AESNI)
488+
#if defined(WOLFSSL_AESGCM_STREAM) && defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_AESNI)
489489
aes_copy->streamData = NULL;
490490
#endif
491491
*aes = aes_copy;
@@ -500,14 +500,6 @@ static int km_AesGet(struct km_AesCtx *ctx, int decrypt_p, int copy_p, Aes **aes
500500
static void km_AesFree(Aes **aes) {
501501
if ((! aes) || (! *aes))
502502
return;
503-
#if defined(HAVE_FIPS) && FIPS_VERSION3_LT(6,0,0)
504-
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_AESNI)
505-
if ((*aes)->streamData) {
506-
ForceZero((*aes)->streamData, 5 * AES_BLOCK_SIZE);
507-
free((*aes)->streamData);
508-
}
509-
#endif
510-
#endif
511503
wc_AesFree(*aes);
512504
#if defined(HAVE_FIPS) && FIPS_VERSION3_LT(6,0,0)
513505
ForceZero(*aes, sizeof **aes);

0 commit comments

Comments
 (0)