[pkg-opensc-commit] [libp11] 156/239: Fix ticket #137: check that private data is not NULL

Eric Dorland eric at moszumanska.debian.org
Sat Oct 17 06:21:25 UTC 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libp11.

commit 201fb4d0ce02b9eaf99d691410b3781044461ed7
Author: Martin Paljak <martin at martinpaljak.net>
Date:   Thu Apr 1 14:30:54 2010 +0000

    Fix ticket #137:
    check that private data is not NULL
---
 src/p11_slot.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/p11_slot.c b/src/p11_slot.c
index 35a8cd1..84acea7 100644
--- a/src/p11_slot.c
+++ b/src/p11_slot.c
@@ -339,7 +339,8 @@ void pkcs11_release_slot(PKCS11_CTX * ctx, PKCS11_SLOT * slot)
 {
 	PKCS11_SLOT_private *priv = PRIVSLOT(slot);
 
-	CRYPTOKI_call(ctx, C_CloseAllSessions(priv->id));
+	if (priv)
+		CRYPTOKI_call(ctx, C_CloseAllSessions(priv->id));
 	OPENSSL_free(slot->_private);
 	OPENSSL_free(slot->description);
 	OPENSSL_free(slot->manufacturer);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git



More information about the pkg-opensc-commit mailing list