fixed memory leak

Reported by OSS-Fuzz
https://oss-fuzz.com/testcase-detail/5697134632632320
This commit is contained in:
Frank Morgner 2019-11-03 04:38:09 +01:00
parent d3f60a657f
commit 6263afbe43
1 changed files with 1 additions and 0 deletions

View File

@ -761,6 +761,7 @@ static int sc_pkcs15emu_piv_init(sc_pkcs15_card_t *p15card)
sc_log(card->ctx, "Failed to read/parse the certificate r=%d",r);
if (cert_out != NULL)
sc_pkcs15_free_certificate(cert_out);
free(cert_der.value);
continue;
}