diff options
author | Doug Hogan <doug@cvs.openbsd.org> | 2015-01-08 01:44:30 +0000 |
---|---|---|
committer | Doug Hogan <doug@cvs.openbsd.org> | 2015-01-08 01:44:30 +0000 |
commit | 8690583bac6b43fa8c9e6988beb64623448d8833 (patch) | |
tree | 27bf638357a0faef4c74c8064b2f8b8049c0dcb3 | |
parent | 8210387ee84ef172c5a7bd1855d35198337c0279 (diff) |
Avoid a double-free in an error path.
ok jsing@ beck@
-rw-r--r-- | lib/libssl/src/crypto/dh/dh_ameth.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libssl/src/crypto/dh/dh_ameth.c b/lib/libssl/src/crypto/dh/dh_ameth.c index 729c996a1b5..24c8bb25ec0 100644 --- a/lib/libssl/src/crypto/dh/dh_ameth.c +++ b/lib/libssl/src/crypto/dh/dh_ameth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh_ameth.c,v 1.12 2014/07/12 16:03:37 miod Exp $ */ +/* $OpenBSD: dh_ameth.c,v 1.13 2015/01/08 01:44:29 doug Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -262,6 +262,7 @@ dh_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) dplen = i2d_ASN1_INTEGER(prkey, &dp); ASN1_INTEGER_free(prkey); + prkey = NULL; if (!PKCS8_pkey_set0(p8, OBJ_nid2obj(NID_dhKeyAgreement), 0, V_ASN1_SEQUENCE, params, dp, dplen)) |