Submitted by: Dequin_Eric@emc.com
Approved by: steve@openssl.org

Check tree->levels to ensure malloc worked.
This commit is contained in:
Dr. Stephen Henson 2009-04-03 11:36:49 +00:00
parent 6252f3bc7c
commit 353cb367e4

View file

@ -160,7 +160,7 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
tree->auth_policies = NULL;
tree->user_policies = NULL;
if (!tree)
if (!tree->levels)
{
OPENSSL_free(tree);
return 0;