mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04:39 +02:00
Fix possible leak in PKCS for failure case with small stack enabled.
This commit is contained in:
@@ -4186,6 +4186,9 @@ static int wc_PKCS7_DecodeKari(PKCS7* pkcs7, byte* pkiMsg, word32 pkiMsgSz,
|
|||||||
pkcs7->privateKeySz);
|
pkcs7->privateKeySz);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
wc_PKCS7_KariFree(kari);
|
wc_PKCS7_KariFree(kari);
|
||||||
|
#ifdef WOLFSSL_SMALL_STACK
|
||||||
|
XFREE(encryptedKey, NULL, DYNAMIC_TYPE_PKCS7);
|
||||||
|
#endif
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user