From: Doug Hogan Date: Thu, 8 Jan 2015 02:21:01 +0000 (-0800) Subject: Avoid a double-free in an error path. X-Git-Tag: OpenSSL_1_1_0-pre1~1627 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1549a265209d449b6aefd2b49d7d39f7fbe0689b;p=oweals%2Fopenssl.git Avoid a double-free in an error path. Signed-off-by: Kurt Roeckx Reviewed-by: Matt Caswell --- diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c index 2ead91ff44..b5c9c24303 100644 --- a/crypto/dh/dh_ameth.c +++ b/crypto/dh/dh_ameth.c @@ -283,6 +283,7 @@ static int 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(pkey->ameth->pkey_id), 0, V_ASN1_SEQUENCE, params, dp, dplen))