diff options
Diffstat (limited to 'src/lib/libcrypto/x509v3/pcy_tree.c')
| -rw-r--r-- | src/lib/libcrypto/x509v3/pcy_tree.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/libcrypto/x509v3/pcy_tree.c b/src/lib/libcrypto/x509v3/pcy_tree.c index bb9777348f..c4239b1fd9 100644 --- a/src/lib/libcrypto/x509v3/pcy_tree.c +++ b/src/lib/libcrypto/x509v3/pcy_tree.c | |||
| @@ -219,13 +219,13 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs, | |||
| 219 | 219 | ||
| 220 | /* If we get this far initialize the tree */ | 220 | /* If we get this far initialize the tree */ |
| 221 | 221 | ||
| 222 | tree = OPENSSL_malloc(sizeof(X509_POLICY_TREE)); | 222 | tree = malloc(sizeof(X509_POLICY_TREE)); |
| 223 | 223 | ||
| 224 | if (!tree) | 224 | if (!tree) |
| 225 | return 0; | 225 | return 0; |
| 226 | 226 | ||
| 227 | tree->flags = 0; | 227 | tree->flags = 0; |
| 228 | tree->levels = OPENSSL_malloc(sizeof(X509_POLICY_LEVEL) * n); | 228 | tree->levels = malloc(sizeof(X509_POLICY_LEVEL) * n); |
| 229 | tree->nlevel = 0; | 229 | tree->nlevel = 0; |
| 230 | tree->extra_data = NULL; | 230 | tree->extra_data = NULL; |
| 231 | tree->auth_policies = NULL; | 231 | tree->auth_policies = NULL; |
| @@ -233,7 +233,7 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs, | |||
| 233 | 233 | ||
| 234 | if (!tree->levels) | 234 | if (!tree->levels) |
| 235 | { | 235 | { |
| 236 | OPENSSL_free(tree); | 236 | free(tree); |
| 237 | return 0; | 237 | return 0; |
| 238 | } | 238 | } |
| 239 | 239 | ||
| @@ -516,7 +516,7 @@ static int tree_prune(X509_POLICY_TREE *tree, X509_POLICY_LEVEL *curr) | |||
| 516 | if (node->data->flags & POLICY_DATA_FLAG_MAP_MASK) | 516 | if (node->data->flags & POLICY_DATA_FLAG_MAP_MASK) |
| 517 | { | 517 | { |
| 518 | node->parent->nchild--; | 518 | node->parent->nchild--; |
| 519 | OPENSSL_free(node); | 519 | free(node); |
| 520 | (void)sk_X509_POLICY_NODE_delete(nodes,i); | 520 | (void)sk_X509_POLICY_NODE_delete(nodes,i); |
| 521 | } | 521 | } |
| 522 | } | 522 | } |
| @@ -531,7 +531,7 @@ static int tree_prune(X509_POLICY_TREE *tree, X509_POLICY_LEVEL *curr) | |||
| 531 | if (node->nchild == 0) | 531 | if (node->nchild == 0) |
| 532 | { | 532 | { |
| 533 | node->parent->nchild--; | 533 | node->parent->nchild--; |
| 534 | OPENSSL_free(node); | 534 | free(node); |
| 535 | (void)sk_X509_POLICY_NODE_delete(nodes, i); | 535 | (void)sk_X509_POLICY_NODE_delete(nodes, i); |
| 536 | } | 536 | } |
| 537 | } | 537 | } |
| @@ -539,7 +539,7 @@ static int tree_prune(X509_POLICY_TREE *tree, X509_POLICY_LEVEL *curr) | |||
| 539 | { | 539 | { |
| 540 | if (curr->anyPolicy->parent) | 540 | if (curr->anyPolicy->parent) |
| 541 | curr->anyPolicy->parent->nchild--; | 541 | curr->anyPolicy->parent->nchild--; |
| 542 | OPENSSL_free(curr->anyPolicy); | 542 | free(curr->anyPolicy); |
| 543 | curr->anyPolicy = NULL; | 543 | curr->anyPolicy = NULL; |
| 544 | } | 544 | } |
| 545 | if (curr == tree->levels) | 545 | if (curr == tree->levels) |
| @@ -721,7 +721,7 @@ static int tree_evaluate(X509_POLICY_TREE *tree) | |||
| 721 | static void exnode_free(X509_POLICY_NODE *node) | 721 | static void exnode_free(X509_POLICY_NODE *node) |
| 722 | { | 722 | { |
| 723 | if (node->data && (node->data->flags & POLICY_DATA_FLAG_EXTRA_NODE)) | 723 | if (node->data && (node->data->flags & POLICY_DATA_FLAG_EXTRA_NODE)) |
| 724 | OPENSSL_free(node); | 724 | free(node); |
| 725 | } | 725 | } |
| 726 | 726 | ||
| 727 | 727 | ||
| @@ -751,8 +751,8 @@ void X509_policy_tree_free(X509_POLICY_TREE *tree) | |||
| 751 | sk_X509_POLICY_DATA_pop_free(tree->extra_data, | 751 | sk_X509_POLICY_DATA_pop_free(tree->extra_data, |
| 752 | policy_data_free); | 752 | policy_data_free); |
| 753 | 753 | ||
| 754 | OPENSSL_free(tree->levels); | 754 | free(tree->levels); |
| 755 | OPENSSL_free(tree); | 755 | free(tree); |
| 756 | 756 | ||
| 757 | } | 757 | } |
| 758 | 758 | ||
