projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
000f221
)
PR: 2385
author
Dr. Stephen Henson
<steve@openssl.org>
Tue, 30 Nov 2010 19:37:33 +0000
(19:37 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Tue, 30 Nov 2010 19:37:33 +0000
(19:37 +0000)
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.
crypto/evp/p_lib.c
patch
|
blob
|
history
diff --git
a/crypto/evp/p_lib.c
b/crypto/evp/p_lib.c
index 1916c616991f9f36fcf6e2f366cc01ae0934690c..e26ccd0d086a5f390cde8b397540f7565100d5a7 100644
(file)
--- 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)
{