aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/ec/ecdh_ossl.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/ec/ecdh_ossl.c')
-rw-r--r--crypto/ec/ecdh_ossl.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/crypto/ec/ecdh_ossl.c b/crypto/ec/ecdh_ossl.c
index bd93793a180a..5608c62b2ac9 100644
--- a/crypto/ec/ecdh_ossl.c
+++ b/crypto/ec/ecdh_ossl.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2002-2019 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
*
* Licensed under the OpenSSL license (the "License"). You may not use
@@ -112,9 +112,8 @@ int ecdh_simple_compute_key(unsigned char **pout, size_t *poutlen,
ret = 1;
err:
- EC_POINT_free(tmp);
- if (ctx)
- BN_CTX_end(ctx);
+ EC_POINT_clear_free(tmp);
+ BN_CTX_end(ctx);
BN_CTX_free(ctx);
OPENSSL_free(buf);
return ret;