summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/ecdh/ech_key.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libcrypto/ecdh/ech_key.c b/src/lib/libcrypto/ecdh/ech_key.c
index aa831f2b87..e41092a411 100644
--- a/src/lib/libcrypto/ecdh/ech_key.c
+++ b/src/lib/libcrypto/ecdh/ech_key.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ech_key.c,v 1.18 2023/06/25 19:26:04 tb Exp $ */ 1/* $OpenBSD: ech_key.c,v 1.19 2023/06/25 19:35:56 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -78,7 +78,6 @@
78#include <openssl/objects.h> 78#include <openssl/objects.h>
79#include <openssl/sha.h> 79#include <openssl/sha.h>
80 80
81#include "bn_local.h"
82#include "ec_local.h" 81#include "ec_local.h"
83 82
84/* 83/*
@@ -180,10 +179,9 @@ ossl_ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
180 ret = outlen; 179 ret = outlen;
181 } 180 }
182 181
183err: 182 err:
184 EC_POINT_free(tmp); 183 EC_POINT_free(tmp);
185 if (ctx) 184 BN_CTX_end(ctx);
186 BN_CTX_end(ctx);
187 BN_CTX_free(ctx); 185 BN_CTX_free(ctx);
188 free(buf); 186 free(buf);
189 return (ret); 187 return (ret);