From: Dr. Stephen Henson Date: Tue, 30 Nov 2010 19:37:33 +0000 (+0000) Subject: PR: 2385 X-Git-Tag: OpenSSL_1_0_0c~7 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=00daa2e6c61954b6e6abca0bc4d42300c2359f7e;p=oweals%2Fopenssl.git PR: 2385 Submitted by: Stefan Birrer Reviewed by: steve Zero key->pkey.ptr after it is freed so the structure can be reused. --- diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c index 1916c61699..e26ccd0d08 100644 --- a/crypto/evp/p_lib.c +++ b/crypto/evp/p_lib.c @@ -411,7 +411,10 @@ void EVP_PKEY_free(EVP_PKEY *x) static void EVP_PKEY_free_it(EVP_PKEY *x) { if (x->ameth && x->ameth->pkey_free) + { x->ameth->pkey_free(x); + x->pkey.ptr = NULL; + } #ifndef OPENSSL_NO_ENGINE if (x->engine) {