From c34fac2dfaf2da90889ed845a5139c916868eea2 Mon Sep 17 00:00:00 2001 From: miod <> Date: Thu, 22 May 2014 21:12:16 +0000 Subject: if (x) free(x) -> free(x); semantic patch generated with coccinelle, carefully eyeballed before applying. Contributed by Cyril Roelandt on tech@ --- src/lib/libcrypto/x509v3/v3_utl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/lib/libcrypto/x509v3/v3_utl.c') diff --git a/src/lib/libcrypto/x509v3/v3_utl.c b/src/lib/libcrypto/x509v3/v3_utl.c index c3328d668d..5b064f8eb2 100644 --- a/src/lib/libcrypto/x509v3/v3_utl.c +++ b/src/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; -- cgit v1.2.3-55-g6feb