Commit 3a7581bf authored by Jonas Maebe's avatar Jonas Maebe Committed by Kurt Roeckx
Browse files

tree_print: check for NULL after allocating err



Signed-off-by: default avatarKurt Roeckx <kurt@roeckx.be>
Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
parent 288b4e4f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -101,6 +101,8 @@ static void tree_print(char *str, X509_POLICY_TREE *tree,
	int i;
	BIO *err;
	err = BIO_new_fp(stderr, BIO_NOCLOSE);
	if (err == NULL)
		return;
	if (!curr)
		curr = tree->levels + tree->nlevel;
	else