diff options
author | Richard Levitte <levitte@openssl.org> | 2001-06-23 16:31:41 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2001-06-23 16:31:41 +0000 |
commit | 870d986131869300c8510fdba2b4937658f3fa34 (patch) | |
tree | 1d48cf16bdbae95dd92c63ac80e4d4b771293603 | |
parent | 4f272c17f50036772570210e62e7b883e9b08b4d (diff) |
apps_startup() needs a corresponding apps_shutdown().
-rw-r--r-- | apps/apps.h | 18 | ||||
-rw-r--r-- | apps/openssl.c | 3 |
2 files changed, 13 insertions, 8 deletions
diff --git a/apps/apps.h b/apps/apps.h index 7f3903478f..34935bde42 100644 --- a/apps/apps.h +++ b/apps/apps.h @@ -116,26 +116,30 @@ extern BIO *bio_err; #endif #if defined(MONOLITH) && !defined(OPENSSL_C) -# define apps_startup() do_pipe_sig() +# define apps_startup() \ + do_pipe_sig() +# define apps_shutdown() #else # if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN16) || \ defined(OPENSSL_SYS_WIN32) # ifdef _O_BINARY # define apps_startup() \ - _fmode=_O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \ + do { _fmode=_O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \ OpenSSL_add_all_algorithms(); ENGINE_load_builtin_engines(); \ - setup_ui_method(); + setup_ui_method(); } while(0) # else # define apps_startup() \ - _fmode=O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \ + do { _fmode=O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \ OpenSSL_add_all_algorithms(); ENGINE_load_builtin_engines(); \ - setup_ui_method(); + setup_ui_method(); } while(0) # endif # else # define apps_startup() \ - do_pipe_sig(); OpenSSL_add_all_algorithms(); \ - ENGINE_load_builtin_engines(); setup_ui_method(); + do { do_pipe_sig(); OpenSSL_add_all_algorithms(); \ + ENGINE_load_builtin_engines(); setup_ui_method(); } while(0) # endif +# define apps_shutdown() \ + destroy_ui_method() #endif typedef struct args_st diff --git a/apps/openssl.c b/apps/openssl.c index 3b4374a048..22bd52ffed 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -350,7 +350,8 @@ end: ERR_free_strings(); ENGINE_cleanup(); - destroy_ui_method(); + + apps_shutdown(); CRYPTO_mem_leaks(bio_err); if (bio_err != NULL) |