From b00a91c8afab47c3fb8fe1d5ba9c8b9487491529 Mon Sep 17 00:00:00 2001 From: sth Date: Wed, 9 Apr 2003 20:19:42 +0000 Subject: [PATCH] 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 --- src/libopensc/pkcs15.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libopensc/pkcs15.c b/src/libopensc/pkcs15.c index b1228c3a..e75a54de 100644 --- a/src/libopensc/pkcs15.c +++ b/src/libopensc/pkcs15.c @@ -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); }