better fix then the previous for the assertion failed bug

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@981 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
sth 2003-04-09 20:19:42 +00:00
parent af89c9b3fd
commit b00a91c8af
1 changed files with 2 additions and 2 deletions

View File

@ -482,7 +482,8 @@ int sc_pkcs15_bind(struct sc_card *card,
err = sc_lock(card);
if (err) {
error(ctx, "sc_lock() failed: %s\n", sc_strerror(err));
goto error_unlock;
sc_pkcs15_card_free(p15card);
SC_FUNC_RETURN(ctx, 1, err);
}
if (card->app_count < 0) {
@ -580,7 +581,6 @@ done:
return 0;
error:
sc_unlock(card);
error_unlock:
sc_pkcs15_card_free(p15card);
SC_FUNC_RETURN(ctx, 1, err);
}