Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2015-04-22 22:08:19 +0300
committerAdam Langley <agl@google.com>2015-05-05 02:08:22 +0300
commitcfaf7ff9bf877239f17c805af6a3d7daae48e0a2 (patch)
tree873c4b8f54c1ba44b94e0c4ff13fd0d4ab516e5d /crypto/ec/oct.c
parent22ccc2d8f1e0a3d19b98324d502322db8d89624f (diff)
Remove unnecessary NULL checks, part 2.
Stuff in crypto/ec. Change-Id: I3bd238c365c4766ed8abc6f835a107478b43b159 Reviewed-on: https://boringssl-review.googlesource.com/4515 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/ec/oct.c')
-rw-r--r--crypto/ec/oct.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/crypto/ec/oct.c b/crypto/ec/oct.c
index 1cb7c2f0..816a42f5 100644
--- a/crypto/ec/oct.c
+++ b/crypto/ec/oct.c
@@ -164,18 +164,14 @@ static size_t ec_GFp_simple_point2oct(const EC_GROUP *group,
if (used_ctx) {
BN_CTX_end(ctx);
}
- if (new_ctx != NULL) {
- BN_CTX_free(new_ctx);
- }
+ BN_CTX_free(new_ctx);
return ret;
err:
if (used_ctx) {
BN_CTX_end(ctx);
}
- if (new_ctx != NULL) {
- BN_CTX_free(new_ctx);
- }
+ BN_CTX_free(new_ctx);
return 0;
}
@@ -275,9 +271,7 @@ static int ec_GFp_simple_oct2point(const EC_GROUP *group, EC_POINT *point,
err:
BN_CTX_end(ctx);
- if (new_ctx != NULL) {
- BN_CTX_free(new_ctx);
- }
+ BN_CTX_free(new_ctx);
return ret;
}
@@ -456,9 +450,7 @@ int ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *group,
err:
BN_CTX_end(ctx);
- if (new_ctx != NULL) {
- BN_CTX_free(new_ctx);
- }
+ BN_CTX_free(new_ctx);
return ret;
}