From: jsing Date: Sat, 7 Jan 2023 16:13:46 +0000 (+0000) Subject: Flip BN_clear_free() and BN_free() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f949966ca538ee74a872fbc4a75c4af2a75169a4;p=openbsd Flip BN_clear_free() and BN_free() All of our BIGNUMs are cleared when we free them - move the code to BN_free() and have BN_clear_free() call BN_free(), rather than the other way around. ok tb@ --- diff --git a/lib/libcrypto/bn/bn_lib.c b/lib/libcrypto/bn/bn_lib.c index e8397cafdae..70b6899a427 100644 --- a/lib/libcrypto/bn/bn_lib.c +++ b/lib/libcrypto/bn/bn_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_lib.c,v 1.69 2023/01/07 16:09:18 jsing Exp $ */ +/* $OpenBSD: bn_lib.c,v 1.70 2023/01/07 16:13:46 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -97,7 +97,7 @@ BN_clear(BIGNUM *a) } void -BN_clear_free(BIGNUM *a) +BN_free(BIGNUM *a) { int i; @@ -112,9 +112,9 @@ BN_clear_free(BIGNUM *a) } void -BN_free(BIGNUM *a) +BN_clear_free(BIGNUM *bn) { - BN_clear_free(a); + BN_free(bn); } /* This stuff appears to be completely unused, so is deprecated */