diff options
author | jsing <> | 2014-07-10 07:43:11 +0000 |
---|---|---|
committer | jsing <> | 2014-07-10 07:43:11 +0000 |
commit | a4e67b1c13f505b2c40c8ea01a2d2c2d80b07750 (patch) | |
tree | 73c2d1cfd1c9669b272f8aeaa3441a982874c635 /src/lib/libcrypto/rsa/rsa_chk.c | |
parent | a056a5f9321e4e7d039f49d894e59dff155713aa (diff) | |
download | openbsd-a4e67b1c13f505b2c40c8ea01a2d2c2d80b07750.tar.gz openbsd-a4e67b1c13f505b2c40c8ea01a2d2c2d80b07750.tar.bz2 openbsd-a4e67b1c13f505b2c40c8ea01a2d2c2d80b07750.zip |
BN_free, BN_clear_free, BN_CTX_free, BN_BLINDING_free and BN_MONT_CTX_free
all have implicit NULL checks, so we do not need them here.
ok miod@
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_chk.c')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_chk.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_chk.c b/src/lib/libcrypto/rsa/rsa_chk.c index 0f9e0944db..c247a8d80e 100644 --- a/src/lib/libcrypto/rsa/rsa_chk.c +++ b/src/lib/libcrypto/rsa/rsa_chk.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_chk.c,v 1.8 2014/07/09 19:51:38 jsing Exp $ */ | 1 | /* $OpenBSD: rsa_chk.c,v 1.9 2014/07/10 07:43:11 jsing Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -52,7 +52,6 @@ | |||
52 | #include <openssl/err.h> | 52 | #include <openssl/err.h> |
53 | #include <openssl/rsa.h> | 53 | #include <openssl/rsa.h> |
54 | 54 | ||
55 | |||
56 | int | 55 | int |
57 | RSA_check_key(const RSA *key) | 56 | RSA_check_key(const RSA *key) |
58 | { | 57 | { |
@@ -203,17 +202,12 @@ RSA_check_key(const RSA *key) | |||
203 | } | 202 | } |
204 | 203 | ||
205 | err: | 204 | err: |
206 | if (i != NULL) | 205 | BN_free(i); |
207 | BN_free(i); | 206 | BN_free(j); |
208 | if (j != NULL) | 207 | BN_free(k); |
209 | BN_free(j); | 208 | BN_free(l); |
210 | if (k != NULL) | 209 | BN_free(m); |
211 | BN_free(k); | 210 | BN_CTX_free(ctx); |
212 | if (l != NULL) | 211 | |
213 | BN_free(l); | ||
214 | if (m != NULL) | ||
215 | BN_free(m); | ||
216 | if (ctx != NULL) | ||
217 | BN_CTX_free(ctx); | ||
218 | return (ret); | 212 | return (ret); |
219 | } | 213 | } |