Commit 353cb367 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

PR: 1616

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

Check tree->levels to ensure malloc worked.
parent 6252f3bc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;