tree_print: check for NULL after allocating err

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
This commit is contained in:
Jonas Maebe 2013-12-09 22:02:35 +01:00 committed by Kurt Roeckx
parent 288b4e4f8f
commit 3a7581bf5a

View File

@ -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