summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509v3/pcy_tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/x509v3/pcy_tree.c')
-rw-r--r--src/lib/libcrypto/x509v3/pcy_tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509v3/pcy_tree.c b/src/lib/libcrypto/x509v3/pcy_tree.c
index ebc4809371..080a87d674 100644
--- a/src/lib/libcrypto/x509v3/pcy_tree.c
+++ b/src/lib/libcrypto/x509v3/pcy_tree.c
@@ -220,7 +220,7 @@ tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs, unsigned int flags)
220 return 0; 220 return 0;
221 221
222 tree->flags = 0; 222 tree->flags = 0;
223 tree->levels = malloc(sizeof(X509_POLICY_LEVEL) * n); 223 tree->levels = reallocarray(NULL, sizeof(X509_POLICY_LEVEL), n);
224 tree->nlevel = 0; 224 tree->nlevel = 0;
225 tree->extra_data = NULL; 225 tree->extra_data = NULL;
226 tree->auth_policies = NULL; 226 tree->auth_policies = NULL;