summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/evp/pmeth_lib.c
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2014-07-12 16:03:36 +0000
committermiod <miod@openbsd.org>2014-07-12 16:03:36 +0000
commit6d04a7b1e8407e9617237f4260725ef336c500fb (patch)
treebbc0f98986ce22a51cebd8697a6f8887f19e0d6f /lib/libcrypto/evp/pmeth_lib.c
parentAdd an initial regress test for libressl, which calls ressl from Go and (diff)
downloadwireguard-openbsd-6d04a7b1e8407e9617237f4260725ef336c500fb.tar.xz
wireguard-openbsd-6d04a7b1e8407e9617237f4260725ef336c500fb.zip
if (x) FOO_free(x) -> FOO_free(x).
Improves readability, keeps the code smaller so that it is warmer in your cache. review & ok deraadt@
Diffstat (limited to 'lib/libcrypto/evp/pmeth_lib.c')
-rw-r--r--lib/libcrypto/evp/pmeth_lib.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libcrypto/evp/pmeth_lib.c b/lib/libcrypto/evp/pmeth_lib.c
index c9c3444a138..12267a6d933 100644
--- a/lib/libcrypto/evp/pmeth_lib.c
+++ b/lib/libcrypto/evp/pmeth_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmeth_lib.c,v 1.8 2014/07/11 08:44:48 jsing Exp $ */
+/* $OpenBSD: pmeth_lib.c,v 1.9 2014/07/12 16:03:37 miod Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
@@ -371,10 +371,8 @@ EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx)
return;
if (ctx->pmeth && ctx->pmeth->cleanup)
ctx->pmeth->cleanup(ctx);
- if (ctx->pkey)
- EVP_PKEY_free(ctx->pkey);
- if (ctx->peerkey)
- EVP_PKEY_free(ctx->peerkey);
+ EVP_PKEY_free(ctx->pkey);
+ EVP_PKEY_free(ctx->peerkey);
#ifndef OPENSSL_NO_ENGINE
if (ctx->engine)
/* The EVP_PKEY_CTX we used belongs to an ENGINE, release the