Clarify formulation (proposed by Bodo Moeller).
[openssl.git] / apps / openssl.c
index 1b3ffe4041061936fc339b981cdbf2b55468facf..c17458ef7cf426551c934cbff324a79364735bc0 100644 (file)
@@ -56,7 +56,7 @@
  * [including the GNU Public Licence.]
  */
 /* ====================================================================
- * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.
+ * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -215,8 +215,8 @@ static void lock_dbg_cb(int mode, int type, const char *file, int line)
 int main(int Argc, char *Argv[])
        {
        ARGS arg;
-#define PROG_NAME_SIZE 16
-       char pname[PROG_NAME_SIZE];
+#define PROG_NAME_SIZE 39
+       char pname[PROG_NAME_SIZE+1];
        FUNCTION f,*fp;
        MS_STATIC char *prompt,buf[1024],config_name[256];
        int n,i,ret=0;
@@ -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();