diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-05-22 21:12:17 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-05-22 21:12:17 +0000 |
commit | e4cd58f507fd46d613ab7dfd04bff18eeb5b8b95 (patch) | |
tree | 0104aca4bba9f2c5c1040b5537390d7b77b0d2d2 /lib/libcrypto/x509v3 | |
parent | e2aa95bd3f6319316d751c070fdd1173ea6432df (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/x509v3')
-rw-r--r-- | lib/libcrypto/x509v3/v3_conf.c | 3 | ||||
-rw-r--r-- | lib/libcrypto/x509v3/v3_utl.c | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/lib/libcrypto/x509v3/v3_conf.c b/lib/libcrypto/x509v3/v3_conf.c index e22aa50fcd3..bfdb473b199 100644 --- a/lib/libcrypto/x509v3/v3_conf.c +++ b/lib/libcrypto/x509v3/v3_conf.c @@ -313,8 +313,7 @@ v3_generic_extension(const char *ext, char *value, int crit, int gen_type, err: ASN1_OBJECT_free(obj); M_ASN1_OCTET_STRING_free(oct); - if (ext_der) - free(ext_der); + free(ext_der); return extension; } diff --git a/lib/libcrypto/x509v3/v3_utl.c b/lib/libcrypto/x509v3/v3_utl.c index c3328d668dd..5b064f8eb25 100644 --- a/lib/libcrypto/x509v3/v3_utl.c +++ b/lib/libcrypto/x509v3/v3_utl.c @@ -422,7 +422,7 @@ unsigned char *string_to_hex(const char *str, long *len) return hexbuf; err: - if(hexbuf) free(hexbuf); + free(hexbuf); X509V3err(X509V3_F_STRING_TO_HEX,ERR_R_MALLOC_FAILURE); return NULL; @@ -623,8 +623,7 @@ ASN1_OCTET_STRING *a2i_IPADDRESS_NC(const char *ipasc) return ret; err: - if (iptmp) - free(iptmp); + free(iptmp); if (ret) ASN1_OCTET_STRING_free(ret); return NULL; |