diff --git a/wolfcrypt/src/pkcs7.c b/wolfcrypt/src/pkcs7.c index 3a79d8fc9..6b6c3ecaa 100644 --- a/wolfcrypt/src/pkcs7.c +++ b/wolfcrypt/src/pkcs7.c @@ -11419,7 +11419,9 @@ authenv_atrbend: XFREE(decryptedKey, pkcs7->heap, DYNAMIC_TYPE_PKCS7); decryptedKey = NULL; #ifdef WOLFSSL_SMALL_STACK + #ifndef NO_PKCS7_STREAM pkcs7->stream->key = NULL; + #endif #endif #endif ret = encryptedContentSz;