summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1
diff options
context:
space:
mode:
authormiod <>2014-05-22 21:12:16 +0000
committermiod <>2014-05-22 21:12:16 +0000
commitc34fac2dfaf2da90889ed845a5139c916868eea2 (patch)
treefd278ca4aaae51bbb11f6b3d67d862d9827370bc /src/lib/libcrypto/asn1
parent5f35ad01d525b3834ce610866244a942ee37c441 (diff)
downloadopenbsd-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/asn1')
-rw-r--r--src/lib/libcrypto/asn1/asn1_gen.c6
-rw-r--r--src/lib/libcrypto/asn1/bio_ndef.c3
2 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/libcrypto/asn1/asn1_gen.c b/src/lib/libcrypto/asn1/asn1_gen.c
index 598a322242..7abbac6059 100644
--- a/src/lib/libcrypto/asn1/asn1_gen.c
+++ b/src/lib/libcrypto/asn1/asn1_gen.c
@@ -258,10 +258,8 @@ ASN1_generate_v3(char *str, X509V3_CTX *cnf)
258 ret = d2i_ASN1_TYPE(NULL, &cp, len); 258 ret = d2i_ASN1_TYPE(NULL, &cp, len);
259 259
260err: 260err:
261 if (orig_der) 261 free(orig_der);
262 free(orig_der); 262 free(new_der);
263 if (new_der)
264 free(new_der);
265 263
266 return ret; 264 return ret;
267} 265}
diff --git a/src/lib/libcrypto/asn1/bio_ndef.c b/src/lib/libcrypto/asn1/bio_ndef.c
index f00d38e5e4..66be025127 100644
--- a/src/lib/libcrypto/asn1/bio_ndef.c
+++ b/src/lib/libcrypto/asn1/bio_ndef.c
@@ -146,8 +146,7 @@ BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it)
146err: 146err:
147 if (asn_bio) 147 if (asn_bio)
148 BIO_free(asn_bio); 148 BIO_free(asn_bio);
149 if (ndef_aux) 149 free(ndef_aux);
150 free(ndef_aux);
151 return NULL; 150 return NULL;
152} 151}
153 152