Skip to content

Commit

Permalink
fixed ressource leak
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmorgner committed Jun 9, 2017
1 parent 32aa51a commit 35c5eb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pkcs11/framework-pkcs15.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 35c5eb0

Please sign in to comment.