Skip to content

Commit

Permalink
Update src/libopensc/card-openpgp.c
Browse files Browse the repository at this point in the history
Co-authored-by: Jakub Jelen <[email protected]>
  • Loading branch information
frankmorgner and Jakuje committed Feb 27, 2024
1 parent fd63beb commit 064af69
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/libopensc/card-openpgp.c
Original file line number Diff line number Diff line change
Expand Up @@ -3563,11 +3563,12 @@ pgp_erase_card(sc_card_t *card)

if (r == SC_SUCCESS && priv->mf) {
new_mf = pgp_new_blob(card, NULL, priv->mf->id, priv->mf->file);
if (new_mf) {
pgp_free_blobs(priv->mf);
priv->mf = new_mf;
populate_blobs_to_mf(card, priv);
if (new_mf == NULL) {
LOG_TEST_RET(card->ctx, SC_ERROR_INTERNAL, "Failed to allocate the new MF blob");
}
pgp_free_blobs(priv->mf);
priv->mf = new_mf;
populate_blobs_to_mf(card, priv);
}

LOG_FUNC_RETURN(card->ctx, r);
Expand Down

0 comments on commit 064af69

Please sign in to comment.