From cae65df81b69f410afddb3d880daac7c43ce3daf Mon Sep 17 00:00:00 2001 From: beck <> Date: Sat, 24 May 2014 13:57:18 +0000 Subject: remove OPENSSL_malloc and CRYPTO_malloc goo from the regress tests. ok miod@ jsing@ guenther@ --- src/regress/lib/libcrypto/ec/ectest.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'src/regress/lib/libcrypto/ec/ectest.c') diff --git a/src/regress/lib/libcrypto/ec/ectest.c b/src/regress/lib/libcrypto/ec/ectest.c index e3028881e0..efb9a529ef 100644 --- a/src/regress/lib/libcrypto/ec/ectest.c +++ b/src/regress/lib/libcrypto/ec/ectest.c @@ -1070,14 +1070,14 @@ static void internal_curve_test(void) crv_len = EC_get_builtin_curves(NULL, 0); - curves = OPENSSL_malloc(sizeof(EC_builtin_curve) * crv_len); + curves = reallocarray(NULL, sizeof(EC_builtin_curve), crv_len); if (curves == NULL) return; if (!EC_get_builtin_curves(curves, crv_len)) { - OPENSSL_free(curves); + free(curves); return; } @@ -1115,7 +1115,7 @@ static void internal_curve_test(void) fprintf(stdout, " failed\n\n"); ABORT; } - OPENSSL_free(curves); + free(curves); return; } @@ -1289,20 +1289,7 @@ void nistp_tests() #endif int main(int argc, char *argv[]) - { - - /* enable memory leak checking unless explicitly disabled */ - if (!((getenv("OPENSSL_DEBUG_MEMORY") != NULL) && (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); + { ERR_load_crypto_strings(); prime_field_tests(); -- cgit v1.2.3-55-g6feb