summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2023-01-07 16:13:46 +0000
committerjsing <>2023-01-07 16:13:46 +0000
commit647a51042d43cddabf51a51f62a8a250a284f399 (patch)
treea7d65be014883dd452a6a0318abcc058642960f6 /src
parentb8509fbf001a81e19a6a7143b220201c9a6e3d1f (diff)
downloadopenbsd-647a51042d43cddabf51a51f62a8a250a284f399.tar.gz
openbsd-647a51042d43cddabf51a51f62a8a250a284f399.tar.bz2
openbsd-647a51042d43cddabf51a51f62a8a250a284f399.zip
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@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/bn/bn_lib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/bn/bn_lib.c b/src/lib/libcrypto/bn/bn_lib.c
index e8397cafda..70b6899a42 100644
--- a/src/lib/libcrypto/bn/bn_lib.c
+++ b/src/lib/libcrypto/bn/bn_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_lib.c,v 1.69 2023/01/07 16:09:18 jsing Exp $ */ 1/* $OpenBSD: bn_lib.c,v 1.70 2023/01/07 16:13:46 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -97,7 +97,7 @@ BN_clear(BIGNUM *a)
97} 97}
98 98
99void 99void
100BN_clear_free(BIGNUM *a) 100BN_free(BIGNUM *a)
101{ 101{
102 int i; 102 int i;
103 103
@@ -112,9 +112,9 @@ BN_clear_free(BIGNUM *a)
112} 112}
113 113
114void 114void
115BN_free(BIGNUM *a) 115BN_clear_free(BIGNUM *bn)
116{ 116{
117 BN_clear_free(a); 117 BN_free(bn);
118} 118}
119 119
120/* This stuff appears to be completely unused, so is deprecated */ 120/* This stuff appears to be completely unused, so is deprecated */