Stop spurious "unable to load config info" errors in req
diff --git a/apps/openssl.c b/apps/openssl.c
index 7edd9e3..a344011 100644
--- a/apps/openssl.c
+++ b/apps/openssl.c
@@ -274,7 +274,12 @@
config=NCONF_new(NULL);
i=NCONF_load(config,p,&errline);
- if (i == 0) ERR_clear_error();
+ if (i == 0)
+ {
+ NCONF_free(config);
+ config = NULL;
+ ERR_clear_error();
+ }
prog=prog_init();
diff --git a/apps/req.c b/apps/req.c
index 9611431..54ddfab 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -479,7 +479,7 @@
req_conf=config;
BIO_printf(bio_err,"Using configuration from %s\n",
default_config_file);
- if (i == 0)
+ if (req_conf == NULL)
{
BIO_printf(bio_err,"Unable to load config info\n");
}