From: tb Date: Sun, 25 Jun 2023 19:35:56 +0000 (+0000) Subject: Remove unneeded bn_local.h and drop a NULL check X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a6f65f71dd032a69ce4ba503cbff4b5f3e83f7b3;p=openbsd Remove unneeded bn_local.h and drop a NULL check --- 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);