[pkg-opensc-commit] [pkcs11-helper] 236/253: openssl: fix memory leak

Eric Dorland eric at moszumanska.debian.org
Fri Jan 6 23:39:23 UTC 2017


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

eric pushed a commit to branch master
in repository pkcs11-helper.

commit 4377bb8c9e58193f10484573d9920d64206186e8
Author: Alon Bar-Lev <alon.barlev at gmail.com>
Date:   Fri Feb 28 16:45:13 2014 +0200

    openssl: fix memory leak
    
    Reported-By: ASPj
    Signed-off-by: Alon Bar-Lev <alon.barlev at gmail.com>
---
 ChangeLog             | 1 +
 lib/pkcs11h-openssl.c | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index f430053..781b004 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@ $Id$
 
  * polarssl: support polarssl-1.3, thanks to Steffan Karger.
  * certificate: ignore certificate object without CKA_ID.
+ * openssl: fix memory leak, thanks to ASPj.
 
 2013-10-11 - Version 1.11
 
diff --git a/lib/pkcs11h-openssl.c b/lib/pkcs11h-openssl.c
index 1936705..c80343a 100644
--- a/lib/pkcs11h-openssl.c
+++ b/lib/pkcs11h-openssl.c
@@ -892,6 +892,10 @@ pkcs11h_openssl_getX509 (
 
 cleanup:
 
+	if (certificate_blob != NULL) {
+		pkcs11h_mem_free((void *)&certificate_blob);
+	}
+
 	if (rv != CKR_OK) {
 		if (x509 != NULL) {
 			X509_free (x509);

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



More information about the pkg-opensc-commit mailing list