diff options
author | miod <> | 2014-05-22 21:12:16 +0000 |
---|---|---|
committer | miod <> | 2014-05-22 21:12:16 +0000 |
commit | c34fac2dfaf2da90889ed845a5139c916868eea2 (patch) | |
tree | fd278ca4aaae51bbb11f6b3d67d862d9827370bc /src/lib/libcrypto/dsa | |
parent | 5f35ad01d525b3834ce610866244a942ee37c441 (diff) | |
download | openbsd-c34fac2dfaf2da90889ed845a5139c916868eea2.tar.gz openbsd-c34fac2dfaf2da90889ed845a5139c916868eea2.tar.bz2 openbsd-c34fac2dfaf2da90889ed845a5139c916868eea2.zip |
if (x) free(x) -> free(x); semantic patch generated with coccinelle, carefully
eyeballed before applying. Contributed by Cyril Roelandt on tech@
Diffstat (limited to 'src/lib/libcrypto/dsa')
-rw-r--r-- | src/lib/libcrypto/dsa/dsa_ameth.c | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/dsa/dsa_pmeth.c | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/libcrypto/dsa/dsa_ameth.c b/src/lib/libcrypto/dsa/dsa_ameth.c index ebca5ec5c5..16617d40f5 100644 --- a/src/lib/libcrypto/dsa/dsa_ameth.c +++ b/src/lib/libcrypto/dsa/dsa_ameth.c | |||
@@ -175,8 +175,7 @@ static int dsa_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) | |||
175 | return 1; | 175 | return 1; |
176 | 176 | ||
177 | err: | 177 | err: |
178 | if (penc) | 178 | free(penc); |
179 | free(penc); | ||
180 | if (pval) | 179 | if (pval) |
181 | ASN1_STRING_free(pval); | 180 | ASN1_STRING_free(pval); |
182 | 181 | ||
@@ -580,8 +579,7 @@ static int dsa_sig_print(BIO *bp, const X509_ALGOR *sigalg, | |||
580 | goto err; | 579 | goto err; |
581 | rv = 1; | 580 | rv = 1; |
582 | err: | 581 | err: |
583 | if (m) | 582 | free(m); |
584 | free(m); | ||
585 | DSA_SIG_free(dsa_sig); | 583 | DSA_SIG_free(dsa_sig); |
586 | return rv; | 584 | return rv; |
587 | } | 585 | } |
diff --git a/src/lib/libcrypto/dsa/dsa_pmeth.c b/src/lib/libcrypto/dsa/dsa_pmeth.c index 4e77c6f64b..a2b3b7f21a 100644 --- a/src/lib/libcrypto/dsa/dsa_pmeth.c +++ b/src/lib/libcrypto/dsa/dsa_pmeth.c | |||
@@ -113,8 +113,7 @@ static int pkey_dsa_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src) | |||
113 | static void pkey_dsa_cleanup(EVP_PKEY_CTX *ctx) | 113 | static void pkey_dsa_cleanup(EVP_PKEY_CTX *ctx) |
114 | { | 114 | { |
115 | DSA_PKEY_CTX *dctx = ctx->data; | 115 | DSA_PKEY_CTX *dctx = ctx->data; |
116 | if (dctx) | 116 | free(dctx); |
117 | free(dctx); | ||
118 | } | 117 | } |
119 | 118 | ||
120 | static int pkey_dsa_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, | 119 | static int pkey_dsa_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, |