Stop spurious "unable to load config info" errors in req
authorDr. Stephen Henson <steve@openssl.org>
Sun, 21 Oct 2001 01:05:53 +0000 (01:05 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sun, 21 Oct 2001 01:05:53 +0000 (01:05 +0000)
apps/openssl.c
apps/req.c

index 7edd9e3132fdd752f56a5f44be192098c545a8ae..a344011778a16e54b1b58c4d89d723d0b825f327 100644 (file)
@@ -274,7 +274,12 @@ int main(int Argc, char *Argv[])
 
        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();
 
index 9611431fe7072a45747b06657a5156112ab91ebc..54ddfab0f4f94b59d3e2de7089c236eedb22208e 100644 (file)
@@ -479,7 +479,7 @@ bad:
                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");
                        }