free buffer when using small stack

This commit is contained in:
Jacob Barthelmeh 2019-06-05 08:13:35 +07:00
parent 4362ce5f6b
commit cba8a7f155

View File

@ -3358,6 +3358,9 @@ static int wc_PKCS7_SignedDataVerifySignature(PKCS7* pkcs7, byte* sig,
XMEMCPY(pkcs7->pkcs7Digest, pkcs7Digest, pkcs7DigestSz);
pkcs7->pkcs7DigestSz = pkcs7DigestSz;
#ifdef WOLFSSL_SMALL_STACK
XFREE(pkcs7Digest, pkcs7->heap, DYNAMIC_TYPE_TMP_BUFFER);
#endif
return PKCS7_SIGNEEDS_CHECK;
}
}