fixed ressource leak
This commit is contained in:
parent
32aa51a0f6
commit
35c5eb0659
|
@ -712,7 +712,7 @@ __pkcs15_create_pubkey_object(struct pkcs15_fw_data *fw_data,
|
|||
object->pub_data = p15_key;
|
||||
if (p15_key && object->pub_info->modulus_length == 0 && p15_key->algorithm == SC_ALGORITHM_RSA)
|
||||
object->pub_info->modulus_length = 8 * p15_key->u.rsa.modulus.len;
|
||||
} else if (pubkey->emulated && (fw_data->p15_card->flags & SC_PKCS15_CARD_FLAG_EMULATED)) {
|
||||
} else if (!(pubkey->emulated && (fw_data->p15_card->flags & SC_PKCS15_CARD_FLAG_EMULATED))) {
|
||||
sc_pkcs15_free_pubkey(p15_key);
|
||||
}
|
||||
if (object->pub_data) {
|
||||
|
|
Loading…
Reference in New Issue