summaryrefslogtreecommitdiff
path: root/lib/libcrypto/dsa
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-05-22 21:12:17 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-05-22 21:12:17 +0000
commite4cd58f507fd46d613ab7dfd04bff18eeb5b8b95 (patch)
tree0104aca4bba9f2c5c1040b5537390d7b77b0d2d2 /lib/libcrypto/dsa
parente2aa95bd3f6319316d751c070fdd1173ea6432df (diff)
if (x) free(x) -> free(x); semantic patch generated with coccinelle, carefully
eyeballed before applying. Contributed by Cyril Roelandt on tech@
Diffstat (limited to 'lib/libcrypto/dsa')
-rw-r--r--lib/libcrypto/dsa/dsa_ameth.c6
-rw-r--r--lib/libcrypto/dsa/dsa_pmeth.c3
2 files changed, 3 insertions, 6 deletions
diff --git a/lib/libcrypto/dsa/dsa_ameth.c b/lib/libcrypto/dsa/dsa_ameth.c
index ebca5ec5c51..16617d40f5b 100644
--- a/lib/libcrypto/dsa/dsa_ameth.c
+++ b/lib/libcrypto/dsa/dsa_ameth.c
@@ -175,8 +175,7 @@ static int dsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey)
return 1;
err:
- if (penc)
- free(penc);
+ free(penc);
if (pval)
ASN1_STRING_free(pval);
@@ -580,8 +579,7 @@ static int dsa_sig_print(BIO *bp, const X509_ALGOR *sigalg,
goto err;
rv = 1;
err:
- if (m)
- free(m);
+ free(m);
DSA_SIG_free(dsa_sig);
return rv;
}
diff --git a/lib/libcrypto/dsa/dsa_pmeth.c b/lib/libcrypto/dsa/dsa_pmeth.c
index 4e77c6f64bb..a2b3b7f21a2 100644
--- a/lib/libcrypto/dsa/dsa_pmeth.c
+++ b/lib/libcrypto/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)
- free(dctx);
+ free(dctx);
}
static int pkey_dsa_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,