mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
fix for memory leak on error
This commit is contained in:
@ -2597,6 +2597,8 @@ static int wc_PKCS7_EncodeContentStream(PKCS7* pkcs7, ESD* esd, void* aes,
|
||||
int szLeft = BER_OCTET_LENGTH;
|
||||
|
||||
if (in == NULL) {
|
||||
XFREE(encContentOut, heap, DYNAMIC_TYPE_PKCS7);
|
||||
XFREE(contentData, heap, DYNAMIC_TYPE_PKCS7);
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user