[pkg-opensc-commit] [opensc] 230/295: Make sure the lock is released when returning
Eric Dorland
eric at moszumanska.debian.org
Sat Jun 24 21:11:35 UTC 2017
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository opensc.
commit 72145165470c29ddc1c771067011d1396a550408
Author: Jakub Jelen <jjelen at redhat.com>
Date: Wed Apr 12 17:42:54 2017 +0200
Make sure the lock is released when returning
---
src/pkcs11/framework-pkcs15.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/pkcs11/framework-pkcs15.c b/src/pkcs11/framework-pkcs15.c
index 2f78a63..3441b99 100644
--- a/src/pkcs11/framework-pkcs15.c
+++ b/src/pkcs11/framework-pkcs15.c
@@ -487,12 +487,16 @@ CK_RV C_GetTokenInfo(CK_SLOT_ID slotID, CK_TOKEN_INFO_PTR pInfo)
goto out;
}
- if (slot->p11card == NULL)
- return CKR_TOKEN_NOT_PRESENT;
+ if (slot->p11card == NULL) {
+ rv = CKR_TOKEN_NOT_PRESENT;
+ goto out;
+ }
fw_data = (struct pkcs15_fw_data *) slot->p11card->fws_data[slot->fw_data_idx];
- if (!fw_data)
- return sc_to_cryptoki_error(SC_ERROR_INTERNAL, "C_GetTokenInfo");
+ if (!fw_data) {
+ rv = sc_to_cryptoki_error(SC_ERROR_INTERNAL, "C_GetTokenInfo");
+ goto out;
+ }
p15card = fw_data->p15_card;
/* User PIN flags are cleared before re-calculation */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/opensc.git
More information about the pkg-opensc-commit
mailing list