From a6f65f71dd032a69ce4ba503cbff4b5f3e83f7b3 Mon Sep 17 00:00:00 2001 From: tb Date: Sun, 25 Jun 2023 19:35:56 +0000 Subject: [PATCH] Remove unneeded bn_local.h and drop a NULL check --- lib/libcrypto/ecdh/ech_key.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/libcrypto/ecdh/ech_key.c b/lib/libcrypto/ecdh/ech_key.c index aa831f2b87c..e41092a411c 100644 --- a/lib/libcrypto/ecdh/ech_key.c +++ b/lib/libcrypto/ecdh/ech_key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ech_key.c,v 1.18 2023/06/25 19:26:04 tb Exp $ */ +/* $OpenBSD: ech_key.c,v 1.19 2023/06/25 19:35:56 tb Exp $ */ /* ==================================================================== * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. * @@ -78,7 +78,6 @@ #include #include -#include "bn_local.h" #include "ec_local.h" /* @@ -180,10 +179,9 @@ ossl_ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, ret = outlen; } -err: + err: EC_POINT_free(tmp); - if (ctx) - BN_CTX_end(ctx); + BN_CTX_end(ctx); BN_CTX_free(ctx); free(buf); return (ret); -- 2.20.1