diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-07-09 16:59:34 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-07-09 16:59:34 +0000 |
commit | 624621680d1fd04c7159f753cc577dc96e9a93cc (patch) | |
tree | 580163b52da46898f4513eebd685e0ad30e277ea /lib/libcrypto/x509v3 | |
parent | b753bd80c65b1e445c62e58b9994fe15bc58c939 (diff) |
{malloc,reallocarray} + memset(,0,) -> calloc
ok tedu@
Diffstat (limited to 'lib/libcrypto/x509v3')
-rw-r--r-- | lib/libcrypto/x509v3/pcy_tree.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libcrypto/x509v3/pcy_tree.c b/lib/libcrypto/x509v3/pcy_tree.c index 8627429d6c0..aaf27e98024 100644 --- a/lib/libcrypto/x509v3/pcy_tree.c +++ b/lib/libcrypto/x509v3/pcy_tree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcy_tree.c,v 1.10 2014/06/12 15:49:31 deraadt Exp $ */ +/* $OpenBSD: pcy_tree.c,v 1.11 2014/07/09 16:59:33 miod Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2004. */ @@ -220,7 +220,7 @@ tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs, unsigned int flags) return 0; tree->flags = 0; - tree->levels = reallocarray(NULL, n, sizeof(X509_POLICY_LEVEL)); + tree->levels = calloc(n, sizeof(X509_POLICY_LEVEL)); tree->nlevel = 0; tree->extra_data = NULL; tree->auth_policies = NULL; @@ -231,8 +231,6 @@ tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs, unsigned int flags) return 0; } - memset(tree->levels, 0, n * sizeof(X509_POLICY_LEVEL)); - tree->nlevel = n; level = tree->levels; |