[pkg-opensc-commit] [libp11] 34/239: rename the destroy_slots and destroy_all_slots to "release" ... functions. make release_slot internal again. free slots aray in release_all_slots.

Eric Dorland eric at moszumanska.debian.org
Sat Oct 17 06:21:05 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 9900e17301e2edc9095811bdde323b9b4e477001
Author: Andreas Jellinghaus <andreas at ionisiert.de>
Date:   Thu Sep 1 15:46:29 2005 +0000

    rename the destroy_slots and destroy_all_slots to "release" ... functions.
    make release_slot internal again.
    free slots aray in release_all_slots.
---
 src/libp11-int.h | 2 ++
 src/libp11.h     | 3 +--
 src/p11_slot.c   | 5 +++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/libp11-int.h b/src/libp11-int.h
index 0398a48..c275e03 100644
--- a/src/libp11-int.h
+++ b/src/libp11-int.h
@@ -119,6 +119,8 @@ typedef struct pkcs11_cert_private {
 #define PKCS11_DUP(s) \
 	pkcs11_strdup((char *) s, sizeof(s))
 
+extern void pkcs11_release_slot(PKCS11_CTX *, PKCS11_SLOT *slot);
+
 extern void pkcs11_destroy_keys(PKCS11_TOKEN *);
 extern void pkcs11_destroy_certs(PKCS11_TOKEN *);
 extern void *pkcs11_malloc(size_t);
diff --git a/src/libp11.h b/src/libp11.h
index 8d6ff00..fe1a1ea 100644
--- a/src/libp11.h
+++ b/src/libp11.h
@@ -106,9 +106,8 @@ extern int PKCS11_enumerate_slots(PKCS11_CTX *,
 			PKCS11_SLOT **slotsp, unsigned int *nslotsp);
 
 /* and free them again */
-extern void PKCS11_destroy_all_slots(PKCS11_CTX *,
+extern void PKCS11_release_all_slots(PKCS11_CTX *,
 			PKCS11_SLOT *slots, unsigned int nslots);
-extern void PKCS11_destroy_slot(PKCS11_CTX *, PKCS11_SLOT *slot);
 
 /* Find the first slot with a token */
 PKCS11_SLOT *PKCS11_find_token(PKCS11_CTX * ctx, 
diff --git a/src/p11_slot.c b/src/p11_slot.c
index e03867f..85cff51 100644
--- a/src/p11_slot.c
+++ b/src/p11_slot.c
@@ -303,15 +303,16 @@ int pkcs11_init_slot(PKCS11_CTX * ctx, PKCS11_SLOT * slot, CK_SLOT_ID id)
 	return 0;
 }
 
-void PKCS11_destroy_all_slots(PKCS11_CTX * ctx,  PKCS11_SLOT *slots, unsigned int nslots)
+void PKCS11_release_all_slots(PKCS11_CTX * ctx,  PKCS11_SLOT *slots, unsigned int nslots)
 {
 	int i;
 
 	for (i=0; i < nslots; i++)
 		PKCS11_destroy_slot(ctx, &slots[i]);
+	OPENSSL_free(slots);
 }
 
-void PKCS11_destroy_slot(PKCS11_CTX * ctx, PKCS11_SLOT * slot)
+void pkcs11_release_slot(PKCS11_CTX * ctx, PKCS11_SLOT * slot)
 {
 	PKCS11_SLOT_private *priv = PRIVSLOT(slot);
 

-- 
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