aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/dsa
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/dsa')
-rw-r--r--crypto/dsa/dsa_ameth.c12
-rw-r--r--crypto/dsa/dsa_gen.c3
-rw-r--r--crypto/dsa/dsa_pmeth.c3
3 files changed, 6 insertions, 12 deletions
diff --git a/crypto/dsa/dsa_ameth.c b/crypto/dsa/dsa_ameth.c
index e26ca848dc..e5009ec585 100644
--- a/crypto/dsa/dsa_ameth.c
+++ b/crypto/dsa/dsa_ameth.c
@@ -169,8 +169,7 @@ static int dsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey)
return 1;
err:
- if (penc)
- OPENSSL_free(penc);
+ OPENSSL_free(penc);
ASN1_STRING_free(str);
return 0;
@@ -329,8 +328,7 @@ static int dsa_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey)
return 1;
err:
- if (dp != NULL)
- OPENSSL_free(dp);
+ OPENSSL_free(dp);
ASN1_STRING_free(params);
ASN1_STRING_clear_free(prkey);
return 0;
@@ -471,8 +469,7 @@ static int do_dsa_print(BIO *bp, const DSA *x, int off, int ptype)
goto err;
ret = 1;
err:
- if (m != NULL)
- OPENSSL_free(m);
+ OPENSSL_free(m);
return (ret);
}
@@ -562,8 +559,7 @@ static int dsa_sig_print(BIO *bp, const X509_ALGOR *sigalg,
goto err;
rv = 1;
err:
- if (m)
- OPENSSL_free(m);
+ OPENSSL_free(m);
DSA_SIG_free(dsa_sig);
return rv;
}
diff --git a/crypto/dsa/dsa_gen.c b/crypto/dsa/dsa_gen.c
index 1827de8d0b..59946f6579 100644
--- a/crypto/dsa/dsa_gen.c
+++ b/crypto/dsa/dsa_gen.c
@@ -644,8 +644,7 @@ int dsa_builtin_paramgen2(DSA *ret, size_t L, size_t N,
if (h_ret != NULL)
*h_ret = h;
}
- if (seed)
- OPENSSL_free(seed);
+ OPENSSL_free(seed);
if (seed_out != seed_tmp)
OPENSSL_free(seed_tmp);
if (ctx)
diff --git a/crypto/dsa/dsa_pmeth.c b/crypto/dsa/dsa_pmeth.c
index c119209ab2..7aa1054437 100644
--- a/crypto/dsa/dsa_pmeth.c
+++ b/crypto/dsa/dsa_pmeth.c
@@ -113,8 +113,7 @@ static int pkey_dsa_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src)
static void pkey_dsa_cleanup(EVP_PKEY_CTX *ctx)
{
DSA_PKEY_CTX *dctx = ctx->data;
- if (dctx)
- OPENSSL_free(dctx);
+ OPENSSL_free(dctx);
}
static int pkey_dsa_sign(EVP_PKEY_CTX *ctx, unsigned char *sig,