fixed memory leak

This commit is contained in:
Frank Morgner 2019-06-24 16:44:12 +02:00
parent bf8d449795
commit af8f965009
1 changed files with 2 additions and 0 deletions

View File

@ -472,6 +472,8 @@ parse_ddo(struct sc_pkcs15_card *p15card, const u8 * buf, size_t buflen)
p15card->file_odf->path = odf_path;
}
if (asn1_ddo[2].flags & SC_ASN1_PRESENT) {
if (p15card->file_tokeninfo)
sc_file_free(p15card->file_tokeninfo);
p15card->file_tokeninfo = sc_file_new();
if (p15card->file_tokeninfo == NULL)
goto mem_err;