diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/ccgost/gost2001.c | 10 | ||||
-rw-r--r-- | engines/ccgost/gost2001_keyx.c | 3 |
2 files changed, 6 insertions, 7 deletions
diff --git a/engines/ccgost/gost2001.c b/engines/ccgost/gost2001.c index 5490a5d760..8b56a30471 100644 --- a/engines/ccgost/gost2001.c +++ b/engines/ccgost/gost2001.c @@ -109,8 +109,8 @@ int fill_GOST2001_params(EC_KEY *eckey, int nid) } ok = 1; err: - if (P) EC_POINT_free(P); - if (grp) EC_GROUP_free(grp); + EC_POINT_free(P); + EC_GROUP_free(grp); if (ctx) BN_CTX_end(ctx); BN_CTX_free(ctx); @@ -243,7 +243,7 @@ DSA_SIG *gost2001_do_sign(const unsigned char *dgst, int dlen, EC_KEY *eckey) if (ctx) BN_CTX_end(ctx); BN_CTX_free(ctx); - if (C) EC_POINT_free(C); + EC_POINT_free(C); BN_free(md); if (!ret) DSA_SIG_free(newsig); @@ -361,7 +361,7 @@ int gost2001_do_verify(const unsigned char *dgst, int dgst_len, ok = 1; } err: - if (C) EC_POINT_free(C); + EC_POINT_free(C); if (ctx) BN_CTX_end(ctx); BN_CTX_free(ctx); @@ -413,7 +413,7 @@ int gost2001_compute_public(EC_KEY *ec) } ok = 256; err: - if (pub_key) EC_POINT_free(pub_key); + EC_POINT_free(pub_key); if (ctx) BN_CTX_end(ctx); BN_CTX_free(ctx); diff --git a/engines/ccgost/gost2001_keyx.c b/engines/ccgost/gost2001_keyx.c index 864d01bfa0..abbacbb40f 100644 --- a/engines/ccgost/gost2001_keyx.c +++ b/engines/ccgost/gost2001_keyx.c @@ -285,7 +285,6 @@ int pkey_GOST01cp_decrypt(EVP_PKEY_CTX *pctx, unsigned char *key, ret = 1; err: EVP_PKEY_free(eph_key); - if (gkt) - GOST_KEY_TRANSPORT_free(gkt); + GOST_KEY_TRANSPORT_free(gkt); return ret; } |