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/dh | |
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/dh')
-rw-r--r-- | src/lib/libcrypto/dh/dh_ameth.c | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/dh/dh_pmeth.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/libcrypto/dh/dh_ameth.c b/src/lib/libcrypto/dh/dh_ameth.c index a22614ae0a..40e0202bff 100644 --- a/src/lib/libcrypto/dh/dh_ameth.c +++ b/src/lib/libcrypto/dh/dh_ameth.c | |||
@@ -167,8 +167,7 @@ static int dh_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) | |||
167 | return 1; | 167 | return 1; |
168 | 168 | ||
169 | err: | 169 | err: |
170 | if (penc) | 170 | free(penc); |
171 | free(penc); | ||
172 | if (pval) | 171 | if (pval) |
173 | ASN1_STRING_free(pval); | 172 | ASN1_STRING_free(pval); |
174 | 173 | ||
diff --git a/src/lib/libcrypto/dh/dh_pmeth.c b/src/lib/libcrypto/dh/dh_pmeth.c index c359bb4d2b..c70feb3789 100644 --- a/src/lib/libcrypto/dh/dh_pmeth.c +++ b/src/lib/libcrypto/dh/dh_pmeth.c | |||
@@ -110,8 +110,7 @@ static int pkey_dh_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src) | |||
110 | static void pkey_dh_cleanup(EVP_PKEY_CTX *ctx) | 110 | static void pkey_dh_cleanup(EVP_PKEY_CTX *ctx) |
111 | { | 111 | { |
112 | DH_PKEY_CTX *dctx = ctx->data; | 112 | DH_PKEY_CTX *dctx = ctx->data; |
113 | if (dctx) | 113 | free(dctx); |
114 | free(dctx); | ||
115 | } | 114 | } |
116 | 115 | ||
117 | static int pkey_dh_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) | 116 | static int pkey_dh_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) |