diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/src/apps/openssl.c | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/src/lib/libssl/src/apps/openssl.c b/src/lib/libssl/src/apps/openssl.c index a7d1c9ba06..1dbc7f464f 100644 --- a/src/lib/libssl/src/apps/openssl.c +++ b/src/lib/libssl/src/apps/openssl.c | |||
@@ -256,25 +256,7 @@ main(int argc, char **argv) | |||
256 | if ((bio_err = BIO_new(BIO_s_file())) != NULL) | 256 | if ((bio_err = BIO_new(BIO_s_file())) != NULL) |
257 | BIO_set_fp(bio_err, stderr, BIO_NOCLOSE | BIO_FP_TEXT); | 257 | BIO_set_fp(bio_err, stderr, BIO_NOCLOSE | BIO_FP_TEXT); |
258 | 258 | ||
259 | if (getenv("OPENSSL_DEBUG_MEMORY") != NULL) { /* if not defined, use | 259 | CRYPTO_set_locking_callback(lock_dbg_cb); |
260 | * compiled-in library | ||
261 | * defaults */ | ||
262 | if (!(0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off"))) { | ||
263 | CRYPTO_malloc_debug_init(); | ||
264 | CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL); | ||
265 | } else { | ||
266 | /* OPENSSL_DEBUG_MEMORY=off */ | ||
267 | CRYPTO_set_mem_debug_functions(0, 0, 0, 0, 0); | ||
268 | } | ||
269 | } | ||
270 | CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); | ||
271 | |||
272 | #if 0 | ||
273 | if (getenv("OPENSSL_DEBUG_LOCKING") != NULL) | ||
274 | #endif | ||
275 | { | ||
276 | CRYPTO_set_locking_callback(lock_dbg_cb); | ||
277 | } | ||
278 | 260 | ||
279 | openssl_startup(); | 261 | openssl_startup(); |
280 | 262 | ||
@@ -376,8 +358,8 @@ main(int argc, char **argv) | |||
376 | ret = 1; | 358 | ret = 1; |
377 | 359 | ||
378 | end: | 360 | end: |
379 | if (to_free) | 361 | free(to_free); |
380 | free(to_free); | 362 | |
381 | if (config != NULL) { | 363 | if (config != NULL) { |
382 | NCONF_free(config); | 364 | NCONF_free(config); |
383 | config = NULL; | 365 | config = NULL; |
@@ -389,7 +371,6 @@ end: | |||
389 | 371 | ||
390 | openssl_shutdown(); | 372 | openssl_shutdown(); |
391 | 373 | ||
392 | CRYPTO_mem_leaks(bio_err); | ||
393 | if (bio_err != NULL) { | 374 | if (bio_err != NULL) { |
394 | BIO_free(bio_err); | 375 | BIO_free(bio_err); |
395 | bio_err = NULL; | 376 | bio_err = NULL; |