aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/x509/x_name.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2015-09-03 09:15:26 -0400
committerRich Salz <rsalz@openssl.org>2015-09-03 16:26:34 -0400
commit64b25758edca688a30f02c260262150f7ad0bc7d (patch)
tree15ad5a8c7985e2b27aaf7a14737fd980a36349dd /crypto/x509/x_name.c
parentfb4844bbc62fb014c115cd8fd2fc4304cba6eb89 (diff)
downloadopenssl-64b25758edca688a30f02c260262150f7ad0bc7d.tar.gz
remove 0 assignments.
After openssl_zalloc, cleanup more "set to 0/NULL" assignments. Many are from github feedback. Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/x509/x_name.c')
-rw-r--r--crypto/x509/x_name.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/x509/x_name.c b/crypto/x509/x_name.c
index f8fd337cff..9bf1523a4c 100644
--- a/crypto/x509/x_name.c
+++ b/crypto/x509/x_name.c
@@ -133,7 +133,7 @@ IMPLEMENT_ASN1_DUP_FUNCTION(X509_NAME)
static int x509_name_ex_new(ASN1_VALUE **val, const ASN1_ITEM *it)
{
- X509_NAME *ret = OPENSSL_malloc(sizeof(*ret));
+ X509_NAME *ret = OPENSSL_zalloc(sizeof(*ret));
if (!ret)
goto memerr;
@@ -141,8 +141,6 @@ static int x509_name_ex_new(ASN1_VALUE **val, const ASN1_ITEM *it)
goto memerr;
if ((ret->bytes = BUF_MEM_new()) == NULL)
goto memerr;
- ret->canon_enc = NULL;
- ret->canon_enclen = 0;
ret->modified = 1;
*val = (ASN1_VALUE *)ret;
return 1;