Document -no_explicit
[openssl.git] / apps / openssl.c
index e6109a0dd1600d6b1dcea49e82d4c16750517fbe..687314522319bdb9b1e3196c03906d2d2b5e3d47 100644 (file)
@@ -231,27 +231,27 @@ int main(int Argc, char *ARGV[])
     long errline;
 
 #if defined( OPENSSL_SYS_VMS) && (__INITIAL_POINTER_SIZE == 64)
-        /*-
-         * 2011-03-22 SMS.
-         * If we have 32-bit pointers everywhere, then we're safe, and
-         * we bypass this mess, as on non-VMS systems.  (See ARGV,
-         * above.)
-         * Problem 1: Compaq/HP C before V7.3 always used 32-bit
-         * pointers for argv[].
-         * Fix 1: For a 32-bit argv[], when we're using 64-bit pointers
-         * everywhere else, we always allocate and use a 64-bit
-         * duplicate of argv[].
-         * Problem 2: Compaq/HP C V7.3 (Alpha, IA64) before ECO1 failed
-         * to NULL-terminate a 64-bit argv[].  (As this was written, the
-         * compiler ECO was available only on IA64.)
-         * Fix 2: Unless advised not to (VMS_TRUST_ARGV), we test a
-         * 64-bit argv[argc] for NULL, and, if necessary, use a
-         * (properly) NULL-terminated (64-bit) duplicate of argv[].
-         * The same code is used in either case to duplicate argv[].
-         * Some of these decisions could be handled in preprocessing,
-         * but the code tends to get even uglier, and the penalty for
-         * deciding at compile- or run-time is tiny.
-         */
+    /*-
+     * 2011-03-22 SMS.
+     * If we have 32-bit pointers everywhere, then we're safe, and
+     * we bypass this mess, as on non-VMS systems.  (See ARGV,
+     * above.)
+     * Problem 1: Compaq/HP C before V7.3 always used 32-bit
+     * pointers for argv[].
+     * Fix 1: For a 32-bit argv[], when we're using 64-bit pointers
+     * everywhere else, we always allocate and use a 64-bit
+     * duplicate of argv[].
+     * Problem 2: Compaq/HP C V7.3 (Alpha, IA64) before ECO1 failed
+     * to NULL-terminate a 64-bit argv[].  (As this was written, the
+     * compiler ECO was available only on IA64.)
+     * Fix 2: Unless advised not to (VMS_TRUST_ARGV), we test a
+     * 64-bit argv[argc] for NULL, and, if necessary, use a
+     * (properly) NULL-terminated (64-bit) duplicate of argv[].
+     * The same code is used in either case to duplicate argv[].
+     * Some of these decisions could be handled in preprocessing,
+     * but the code tends to get even uglier, and the penalty for
+     * deciding at compile- or run-time is tiny.
+     */
     char **Argv = NULL;
     int free_Argv = 0;
 
@@ -428,10 +428,6 @@ int main(int Argc, char *ARGV[])
     if (arg.data != NULL)
         OPENSSL_free(arg.data);
 
-    if (bio_err != NULL) {
-        BIO_free(bio_err);
-        bio_err = NULL;
-    }
 #if defined( OPENSSL_SYS_VMS) && (__INITIAL_POINTER_SIZE == 64)
     /* Free any duplicate Argv[] storage. */
     if (free_Argv) {
@@ -440,6 +436,10 @@ int main(int Argc, char *ARGV[])
 #endif
     apps_shutdown();
     CRYPTO_mem_leaks(bio_err);
+    if (bio_err != NULL) {
+        BIO_free(bio_err);
+        bio_err = NULL;
+    }
 
     OPENSSL_EXIT(ret);
 }