Module Name:    src
Committed By:   tteras
Date:           Mon Apr 20 13:22:43 UTC 2009

Modified Files:
        src/crypto/dist/ipsec-tools/src/racoon: crypto_openssl.c

Log Message:
>From Stephen Bevan: Fix a x509 signature verification memory leak.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 \
    src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c:1.17 src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c:1.18
--- src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c:1.17	Thu Mar 12 10:57:26 2009
+++ src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c	Mon Apr 20 13:22:41 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: crypto_openssl.c,v 1.17 2009/03/12 10:57:26 tteras Exp $	*/
+/*	$NetBSD: crypto_openssl.c,v 1.18 2009/04/20 13:22:41 tteras Exp $	*/
 
 /* Id: crypto_openssl.c,v 1.47 2006/05/06 20:42:09 manubsd Exp */
 
@@ -959,12 +959,14 @@
 	evp = X509_get_pubkey(x509);
 	if (! evp) {
 		plog(LLV_ERROR, LOCATION, NULL, "X509_get_pubkey(): %s\n", eay_strerror());
+		X509_free(x509);
 		return -1;
 	}
 
 	res = eay_rsa_verify(source, sig, evp->pkey.rsa);
 
 	EVP_PKEY_free(evp);
+	X509_free(x509);
 
 	return res;
 }

Reply via email to