summaryrefslogtreecommitdiff
path: root/lib/libcrypto/x509v3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcrypto/x509v3')
-rw-r--r--lib/libcrypto/x509v3/v3_conf.c3
-rw-r--r--lib/libcrypto/x509v3/v3_utl.c5
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;