Submitted by: Stefan Birrer <stefan.birrer@adnovum.ch>
Reviewed by: steve

Zero key->pkey.ptr after it is freed so the structure can be reused.
This commit is contained in:
Dr. Stephen Henson 2010-11-30 19:37:21 +00:00
parent 4585fd0734
commit 09c1dc850c
1 changed files with 3 additions and 0 deletions

View File

@ -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)
{