summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2014-05-05 16:08:16 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2014-05-05 16:08:16 +0000
commitd2589c898401515327537ad7bb76857ab3e8bb9e (patch)
tree88023556bd092ef2f428feda6dd544f74f32c54c
parent2145c8e87f3c810962aa9823415aeae9ac9cc59a (diff)
Kill memory debug calls that are now noops. While here, nuke an #if 0 and
a unnecessary NULL check before free. ok miod@
-rw-r--r--lib/libssl/src/apps/openssl.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/lib/libssl/src/apps/openssl.c b/lib/libssl/src/apps/openssl.c
index a7d1c9ba06a..1dbc7f464fe 100644
--- a/lib/libssl/src/apps/openssl.c
+++ b/lib/libssl/src/apps/openssl.c
@@ -256,25 +256,7 @@ main(int argc, char **argv)
if ((bio_err = BIO_new(BIO_s_file())) != NULL)
BIO_set_fp(bio_err, stderr, BIO_NOCLOSE | BIO_FP_TEXT);
- if (getenv("OPENSSL_DEBUG_MEMORY") != NULL) { /* if not defined, use
- * compiled-in library
- * defaults */
- if (!(0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off"))) {
- CRYPTO_malloc_debug_init();
- CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL);
- } else {
- /* OPENSSL_DEBUG_MEMORY=off */
- CRYPTO_set_mem_debug_functions(0, 0, 0, 0, 0);
- }
- }
- CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
-
-#if 0
- if (getenv("OPENSSL_DEBUG_LOCKING") != NULL)
-#endif
- {
- CRYPTO_set_locking_callback(lock_dbg_cb);
- }
+ CRYPTO_set_locking_callback(lock_dbg_cb);
openssl_startup();
@@ -376,8 +358,8 @@ main(int argc, char **argv)
ret = 1;
end:
- if (to_free)
- free(to_free);
+ free(to_free);
+
if (config != NULL) {
NCONF_free(config);
config = NULL;
@@ -389,7 +371,6 @@ end:
openssl_shutdown();
- CRYPTO_mem_leaks(bio_err);
if (bio_err != NULL) {
BIO_free(bio_err);
bio_err = NULL;