summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2014-05-05 16:08:15 +0000
committerjsing <jsing@openbsd.org>2014-05-05 16:08:15 +0000
commitc70e270c3beae8fee85f323646d4afbb8a12f683 (patch)
treed6e0e61446f25dc9491fc63c49eef303d9e9c32e
parentOpenBSD has_SC_CLK_TCK. (diff)
downloadwireguard-openbsd-c70e270c3beae8fee85f323646d4afbb8a12f683.tar.xz
wireguard-openbsd-c70e270c3beae8fee85f323646d4afbb8a12f683.zip
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;