summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/pmeth_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/evp/pmeth_lib.c')
-rw-r--r--src/lib/libcrypto/evp/pmeth_lib.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libcrypto/evp/pmeth_lib.c b/src/lib/libcrypto/evp/pmeth_lib.c
index c9c3444a13..12267a6d93 100644
--- a/src/lib/libcrypto/evp/pmeth_lib.c
+++ b/src/lib/libcrypto/evp/pmeth_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pmeth_lib.c,v 1.8 2014/07/11 08:44:48 jsing Exp $ */ 1/* $OpenBSD: pmeth_lib.c,v 1.9 2014/07/12 16:03:37 miod Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -371,10 +371,8 @@ EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx)
371 return; 371 return;
372 if (ctx->pmeth && ctx->pmeth->cleanup) 372 if (ctx->pmeth && ctx->pmeth->cleanup)
373 ctx->pmeth->cleanup(ctx); 373 ctx->pmeth->cleanup(ctx);
374 if (ctx->pkey) 374 EVP_PKEY_free(ctx->pkey);
375 EVP_PKEY_free(ctx->pkey); 375 EVP_PKEY_free(ctx->peerkey);
376 if (ctx->peerkey)
377 EVP_PKEY_free(ctx->peerkey);
378#ifndef OPENSSL_NO_ENGINE 376#ifndef OPENSSL_NO_ENGINE
379 if (ctx->engine) 377 if (ctx->engine)
380 /* The EVP_PKEY_CTX we used belongs to an ENGINE, release the 378 /* The EVP_PKEY_CTX we used belongs to an ENGINE, release the