add additional checks + cleanup
[openssl.git] / crypto / x509v3 / pcy_tree.c
index 62eea0c4ab1e43f613158ce918183554ecb5005a..1c68ce3352ccce0ffb4c2aefc8806f99f685b4e4 100644 (file)
@@ -631,6 +631,7 @@ int X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy,
                break;
                }
 
+       if (!tree) goto error;
        ret = tree_evaluate(tree);
 
        if (ret <= 0)