Skip to content

Commit f00c5eb

Browse files
author
Andras Fekete
committed
Fix double free
Warning 546055.3229451
1 parent c8188ea commit f00c5eb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

wolfcrypt/src/asn.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37601,8 +37601,10 @@ int wc_MIME_parse_headers(char* in, int inLen, MimeHdr** headers)
3760137601
mimeType == MIME_PARAM)) && pos >= 1) {
3760237602
mimeStatus = MIME_BODYVAL;
3760337603
end = pos-1;
37604-
if (nameAttr != NULL)
37604+
if (nameAttr != NULL) {
3760537605
XFREE(nameAttr, NULL, DYNAMIC_TYPE_PKCS7);
37606+
nameAttr = NULL;
37607+
}
3760637608
ret = wc_MIME_header_strip(curLine, &nameAttr, start, end);
3760737609
if (ret) {
3760837610
goto error;

0 commit comments

Comments
 (0)