[pkg-opensc-commit] [libp11] 67/239: fix memory leak, indent

Eric Dorland eric at moszumanska.debian.org
Sat Oct 17 06:21:10 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 a05db38adc80a01c089eb9d0860b2789fc5f680c
Author: Nils Larsch <nlarsch at gmx.net>
Date:   Sat Oct 22 14:01:06 2005 +0000

    fix memory leak, indent
---
 src/p11_key.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/p11_key.c b/src/p11_key.c
index 3cac2b2..813d88e 100644
--- a/src/p11_key.c
+++ b/src/p11_key.c
@@ -437,14 +437,13 @@ int PKCS11_get_key_exponent(PKCS11_KEY * key, BIGNUM **bn)
 
 int PKCS11_get_key_size(const PKCS11_KEY * key) 
 {
-   BIGNUM* n;
-   int numbytes=0;
-   n=BN_new();
-   if(key_getattr_bn(key, CKA_MODULUS, &n)) 
-	   return 0;
-   numbytes=BN_num_bytes(n);
-   BN_free(n);
-   return numbytes;
+	BIGNUM* n;
+	int     numbytes = 0;
+	if(key_getattr_bn(key, CKA_MODULUS, &n))
+		return 0;
+	numbytes = BN_num_bytes(n);
+	BN_free(n);
+	return numbytes;
 }
 
 

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