static int tree_add_unmatched(X509_POLICY_LEVEL *curr,
                              const X509_POLICY_CACHE *cache,
                              const ASN1_OBJECT *id,
                              X509_POLICY_NODE *node, X509_POLICY_TREE *tree)
{
    X509_POLICY_DATA *data;
    if (id == NULL)
        id = node->data->valid_policy;
    if ((data = policy_data_new(NULL, id, node_critical(node))) == NULL)
        return 0;
    data->qualifier_set = cache->anyPolicy->qualifier_set;
    data->flags |= POLICY_DATA_FLAG_SHARED_QUALIFIERS;
    if (level_add_node(curr, data, node, tree) == NULL) {
        policy_data_free(data);
        return 0;
    }
    return 1;
}
['static int tree_add_unmatched(X509_POLICY_LEVEL *curr,\n                              const X509_POLICY_CACHE *cache,\n                              const ASN1_OBJECT *id,\n                              X509_POLICY_NODE *node, X509_POLICY_TREE *tree)\n{\n    X509_POLICY_DATA *data;\n    if (id == NULL)\n        id = node->data->valid_policy;\n    if ((data = policy_data_new(NULL, id, node_critical(node))) == NULL)\n        return 0;\n    data->qualifier_set = cache->anyPolicy->qualifier_set;\n    data->flags |= POLICY_DATA_FLAG_SHARED_QUALIFIERS;\n    if (level_add_node(curr, data, node, tree) == NULL) {\n        policy_data_free(data);\n        return 0;\n    }\n    return 1;\n}', 'X509_POLICY_DATA *policy_data_new(POLICYINFO *policy,\n                                  const ASN1_OBJECT *cid, int crit)\n{\n    X509_POLICY_DATA *ret;\n    ASN1_OBJECT *id;\n    if (!policy && !cid)\n        return NULL;\n    if (cid) {\n        id = OBJ_dup(cid);\n        if (!id)\n            return NULL;\n    } else\n        id = NULL;\n    ret = OPENSSL_zalloc(sizeof(*ret));\n    if (ret == NULL)\n        return NULL;\n    ret->expected_policy_set = sk_ASN1_OBJECT_new_null();\n    if (ret->expected_policy_set == NULL) {\n        OPENSSL_free(ret);\n        ASN1_OBJECT_free(id);\n        return NULL;\n    }\n    if (crit)\n        ret->flags = POLICY_DATA_FLAG_CRITICAL;\n    if (id)\n        ret->valid_policy = id;\n    else {\n        ret->valid_policy = policy->policyid;\n        policy->policyid = NULL;\n    }\n    if (policy) {\n        ret->qualifier_set = policy->qualifiers;\n        policy->qualifiers = NULL;\n    }\n    return ret;\n}', 'void *CRYPTO_zalloc(size_t num, const char *file, int line)\n{\n    void *ret = CRYPTO_malloc(num, file, line);\n    if (ret != NULL)\n        memset(ret, 0, num);\n    return ret;\n}', 'void *CRYPTO_malloc(size_t num, const char *file, int line)\n{\n    void *ret = NULL;\n    if (num <= 0)\n        return NULL;\n    allow_customize = 0;\n#ifndef OPENSSL_NO_CRYPTO_MDEBUG\n    if (call_malloc_debug) {\n        CRYPTO_mem_debug_malloc(NULL, num, 0, file, line);\n        ret = malloc(num);\n        CRYPTO_mem_debug_malloc(ret, num, 1, file, line);\n    } else {\n        ret = malloc(num);\n    }\n#else\n    (void)file;\n    (void)line;\n    ret = malloc(num);\n#endif\n#ifndef OPENSSL_CPUID_OBJ\n    if (ret && (num > 2048)) {\n        extern unsigned char cleanse_ctr;\n        ((unsigned char *)ret)[0] = cleanse_ctr;\n    }\n#endif\n    return ret;\n}', 'DEFINE_STACK_OF(ASN1_OBJECT)', '_STACK *sk_new_null(void)\n{\n    return sk_new((int (*)(const void *, const void *))0);\n}', '_STACK *sk_new(int (*c) (const void *, const void *))\n{\n    _STACK *ret;\n    if ((ret = OPENSSL_zalloc(sizeof(_STACK))) == NULL)\n        goto err;\n    if ((ret->data = OPENSSL_zalloc(sizeof(*ret->data) * MIN_NODES)) == NULL)\n        goto err;\n    ret->comp = c;\n    ret->num_alloc = MIN_NODES;\n    return (ret);\n err:\n    OPENSSL_free(ret);\n    return (NULL);\n}']