diff options
author | Rich Salz <rsalz@openssl.org> | 2015-03-25 18:35:24 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-03-25 18:35:24 -0400 |
commit | 8fdc3734c063146b038608c2412a0f2c9b21b6d6 (patch) | |
tree | ed30d40a40a6bf7002121a29e3db4b4790a54d87 /crypto/ec/ec_mult.c | |
parent | 17dd65e6e1f888b4561d559b4d44fbbe0a0aa3e7 (diff) |
free NULL cleanup.
This gets EC_GROUP_clear_free EC_GROUP_free, EC_KEY_free,
EC_POINT_clear_free, EC_POINT_free
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'crypto/ec/ec_mult.c')
-rw-r--r-- | crypto/ec/ec_mult.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/crypto/ec/ec_mult.c b/crypto/ec/ec_mult.c index 16b37db671..243b5392e0 100644 --- a/crypto/ec/ec_mult.c +++ b/crypto/ec/ec_mult.c @@ -556,8 +556,7 @@ int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, err: if (new_ctx != NULL) BN_CTX_free(new_ctx); - if (tmp != NULL) - EC_POINT_free(tmp); + EC_POINT_free(tmp); if (wsize != NULL) OPENSSL_free(wsize); if (wNAF_len != NULL) @@ -759,10 +758,8 @@ int ec_wNAF_precompute_mult(EC_GROUP *group, BN_CTX *ctx) EC_POINT_free(*p); OPENSSL_free(points); } - if (tmp_point) - EC_POINT_free(tmp_point); - if (base) - EC_POINT_free(base); + EC_POINT_free(tmp_point); + EC_POINT_free(base); return ret; } |