Aktiv Co./Aleksey Samsonov:
fix a bug in rutoken driver. git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3711 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
16f045bf0c
commit
0c2fe83c3b
@ -39,9 +39,14 @@
|
||||
*/
|
||||
static int rtecp_erase(sc_profile_t *profile, sc_card_t *card)
|
||||
{
|
||||
int r;
|
||||
|
||||
if (!profile || !card)
|
||||
return SC_ERROR_INVALID_ARGUMENTS;
|
||||
return sc_card_ctl(card, SC_CARDCTL_RTECP_INIT, NULL);
|
||||
r = sc_card_ctl(card, SC_CARDCTL_RTECP_INIT, NULL);
|
||||
if (r == SC_SUCCESS)
|
||||
sc_free_apps(card);
|
||||
return r;
|
||||
}
|
||||
|
||||
static int create_sysdf(sc_profile_t *profile, sc_card_t *card, const char *name)
|
||||
|
@ -465,6 +465,8 @@ rutoken_erase(struct sc_profile *profile, sc_card_t *card)
|
||||
}
|
||||
if (ret != SC_SUCCESS)
|
||||
sc_error(card->ctx, "Failed to erase: %s\n", sc_strerror(ret));
|
||||
else
|
||||
sc_free_apps(card);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user