Module Name: src
Committed By: tteras
Date: Mon Apr 20 13:33:30 UTC 2009
Modified Files:
src/crypto/dist/ipsec-tools/src/racoon [ipsec-tools-0_7-branch]:
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.11.6.4 -r1.11.6.5 \
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.11.6.4 src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c:1.11.6.5
--- src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c:1.11.6.4 Tue Jul 15 00:55:48 2008
+++ src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c Mon Apr 20 13:33:30 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: crypto_openssl.c,v 1.11.6.4 2008/07/15 00:55:48 mgrooms Exp $ */
+/* $NetBSD: crypto_openssl.c,v 1.11.6.5 2009/04/20 13:33:30 tteras Exp $ */
/* Id: crypto_openssl.c,v 1.47 2006/05/06 20:42:09 manubsd Exp */
@@ -901,12 +901,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;
}