Skip to content

Commit

Permalink
Merge pull request #8341 from douzzer/20250108-PKCS12_CoalesceOctetSt…
Browse files Browse the repository at this point in the history
…rings-leak

20250108-PKCS12_CoalesceOctetStrings-leak
  • Loading branch information
dgarske authored Jan 8, 2025
2 parents 78776ba + 8d85ab9 commit 5f95fe3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wolfcrypt/src/pkcs12.c
Original file line number Diff line number Diff line change
Expand Up @@ -1277,11 +1277,11 @@ static int PKCS12_CoalesceOctetStrings(WC_PKCS12* pkcs12, byte* data,
if (mergedSz > 0) {
/* Copy over concatenated octet strings into data buffer */
XMEMCPY(&data[*idx], mergedData, mergedSz);

XFREE(mergedData, pkcs12->heap, DYNAMIC_TYPE_PKCS);
}
}

XFREE(mergedData, pkcs12->heap, DYNAMIC_TYPE_PKCS);

return ret;
}
#endif
Expand Down

0 comments on commit 5f95fe3

Please sign in to comment.