Skip to content

Commit b206e07

Browse files
author
Andras Fekete
committed
Uninitialized Variable
Warning 545067.3236517
1 parent f5c3fcf commit b206e07

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

wolfcrypt/src/pkcs7.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12576,7 +12576,14 @@ int wc_PKCS7_EncodeEncryptedData(PKCS7* pkcs7, byte* output, word32 outputSz)
1257612576
return MEMORY_E;
1257712577
}
1257812578

12579-
FlattenAttributes(pkcs7, flatAttribs, attribs, attribsCount);
12579+
ret = FlattenAttributes(pkcs7, flatAttribs, attribs, attribsCount);
12580+
if (ret != 0) {
12581+
XFREE(attribs, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
12582+
XFREE(encryptedContent, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
12583+
XFREE(plain, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
12584+
XFREE(flatAttribs, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
12585+
return ret;
12586+
}
1258012587
attribsSetSz = SetImplicit(ASN_SET, 1, attribsSz, attribSet);
1258112588

1258212589
} else {

0 commit comments

Comments
 (0)