pkcs15-prkey: Free allocated data on all error exit paths

Thanks oss-fuzz

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18790
This commit is contained in:
Jakub Jelen 2019-11-14 13:21:42 +01:00 committed by Frank Morgner
parent 6d6d158f13
commit c4dcac5de7
1 changed files with 1 additions and 0 deletions

View File

@ -299,6 +299,7 @@ int sc_pkcs15_decode_prkdf_entry(struct sc_pkcs15_card *p15card,
if (!p15card->app || !p15card->app->ddo.aid.len) {
if (!p15card->file_app) {
sc_pkcs15_free_key_params(&info.params);
return SC_ERROR_INTERNAL;
}
r = sc_pkcs15_make_absolute_path(&p15card->file_app->path, &info.path);