diff options
author | miod <> | 2014-07-12 16:03:37 +0000 |
---|---|---|
committer | miod <> | 2014-07-12 16:03:37 +0000 |
commit | 1ae7466a2fdd60df6484d8d132d70a044fd58c92 (patch) | |
tree | b756e0522f06b8c8ef257885370d0ada8f818fa8 /src/lib/libcrypto/ec/ec_curve.c | |
parent | 3c4c98fca81949fb441815860d40ad66626df65d (diff) | |
download | openbsd-1ae7466a2fdd60df6484d8d132d70a044fd58c92.tar.gz openbsd-1ae7466a2fdd60df6484d8d132d70a044fd58c92.tar.bz2 openbsd-1ae7466a2fdd60df6484d8d132d70a044fd58c92.zip |
if (x) FOO_free(x) -> FOO_free(x).
Improves readability, keeps the code smaller so that it is warmer in your
cache.
review & ok deraadt@
Diffstat (limited to 'src/lib/libcrypto/ec/ec_curve.c')
-rw-r--r-- | src/lib/libcrypto/ec/ec_curve.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/src/lib/libcrypto/ec/ec_curve.c b/src/lib/libcrypto/ec/ec_curve.c index baac8c7156..9d36d0bf22 100644 --- a/src/lib/libcrypto/ec/ec_curve.c +++ b/src/lib/libcrypto/ec/ec_curve.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ec_curve.c,v 1.6 2014/07/10 22:45:57 jsing Exp $ */ | 1 | /* $OpenBSD: ec_curve.c,v 1.7 2014/07/12 16:03:37 miod Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Nils Larsch for the OpenSSL project. | 3 | * Written by Nils Larsch for the OpenSSL project. |
4 | */ | 4 | */ |
@@ -2981,22 +2981,14 @@ err: | |||
2981 | EC_GROUP_free(group); | 2981 | EC_GROUP_free(group); |
2982 | group = NULL; | 2982 | group = NULL; |
2983 | } | 2983 | } |
2984 | if (P) | 2984 | EC_POINT_free(P); |
2985 | EC_POINT_free(P); | 2985 | BN_CTX_free(ctx); |
2986 | if (ctx) | 2986 | BN_free(p); |
2987 | BN_CTX_free(ctx); | 2987 | BN_free(a); |
2988 | if (p) | 2988 | BN_free(b); |
2989 | BN_free(p); | 2989 | BN_free(order); |
2990 | if (a) | 2990 | BN_free(x); |
2991 | BN_free(a); | 2991 | BN_free(y); |
2992 | if (b) | ||
2993 | BN_free(b); | ||
2994 | if (order) | ||
2995 | BN_free(order); | ||
2996 | if (x) | ||
2997 | BN_free(x); | ||
2998 | if (y) | ||
2999 | BN_free(y); | ||
3000 | return group; | 2992 | return group; |
3001 | } | 2993 | } |
3002 | 2994 | ||