Skip to content

Commit

Permalink
Add missing sc_unlock and fix typo in comment in card-piv.c
Browse files Browse the repository at this point in the history
 On branch piv-aid-discovery
 Changes to be committed:
	modified:   card-piv.c
  • Loading branch information
dengert committed Feb 7, 2018
1 parent c24a91e commit 8cdd512
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libopensc/card-piv.c
Original file line number Diff line number Diff line change
Expand Up @@ -3036,7 +3036,7 @@ static int piv_match_card(sc_card_t *card)
if (card->type == -1)
card->type = type;

card->drv_data = priv; /* will frre if no match, or pass on to piv_init */
card->drv_data = priv; /* will free if no match, or pass on to piv_init */
priv->aid_file = sc_file_new();
priv->selected_obj = -1;
priv->pin_preference = 0x80; /* 800-73-3 part 1, table 3 */
Expand Down Expand Up @@ -3394,6 +3394,7 @@ piv_pin_cmd(sc_card_t *card, struct sc_pin_cmd_data *data, int *tries_left)
if (data->cmd == SC_PIN_CMD_VERIFY && r < 0 && priv->context_specific) {
sc_log(card->ctx,"Clearing CONTEXT_SPECIFIC");
priv->context_specific = 0;
sc_unlock(card);
}

/* if access to applet is know to be reset by other driver we select_aid and try again */
Expand Down

0 comments on commit 8cdd512

Please sign in to comment.