Skip to content

Commit

Permalink
wolfcrypt/src/pkcs12.c: fix resource leak in PKCS12_CoalesceOctetStri…
Browse files Browse the repository at this point in the history
…ngs().
  • Loading branch information
douzzer committed Jan 8, 2025
1 parent 78776ba commit 8d85ab9
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 8d85ab9

Please sign in to comment.