Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/dist/ipsec-tools/src/racoon Avoid double frees (thank...
details: https://anonhg.NetBSD.org/src/rev/3aa86a19d3f1
branches: trunk
changeset: 360824:3aa86a19d3f1
user: christos <christos%NetBSD.org@localhost>
date: Sun Apr 01 22:59:57 2018 +0000
description:
Avoid double frees (thanks asan)
diffstat:
crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r e4a7beff916d -r 3aa86a19d3f1 crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c
--- a/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c Sun Apr 01 22:35:22 2018 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.c Sun Apr 01 22:59:57 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crypto_openssl.c,v 1.27 2018/02/07 03:59:03 christos Exp $ */
+/* $NetBSD: crypto_openssl.c,v 1.28 2018/04/01 22:59:57 christos Exp $ */
/* Id: crypto_openssl.c,v 1.47 2006/05/06 20:42:09 manubsd Exp */
@@ -2331,6 +2331,7 @@
goto end;
if (!DH_set0_pqg(dh, p, NULL, g))
goto end;
+ p = g = NULL;
if (publen != 0)
DH_set_length(dh, publen);
@@ -2395,9 +2396,11 @@
if (!DH_set0_pqg(dh, p, NULL, g))
goto end;
+ p = g = NULL;
if (!DH_set0_key(dh, pub_key, priv_key))
goto end;
+ pub_key = priv_key = NULL;
if ((v = racoon_calloc(prime->l, sizeof(u_char))) == NULL)
goto end;
@@ -2565,7 +2568,6 @@
return rsa_pub;
out:
BN_free(exp);
- BN_free(exp);
RSA_free(rsa_pub);
return NULL;
}
Home |
Main Index |
Thread Index |
Old Index