From 39029a1bb0cd10de986239c9fc58228c2501a5f4 Mon Sep 17 00:00:00 2001 From: Eugene Syromiatnikov Date: Wed, 30 Jul 2025 16:54:09 +0200 Subject: [PATCH] test/testutil/main.c: move global_init before test_open_streams MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit So it is possible to change the allocator implementation, as it must be before the first malloc call. Suggested-by: Matt Caswell Signed-off-by: Eugene Syromiatnikov Reviewed-by: Saša Nedvědický Reviewed-by: Matt Caswell Reviewed-by: Paul Dale Reviewed-by: Neil Horman (Merged from https://github.com/openssl/openssl/pull/28059) --- test/testutil/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/testutil/main.c b/test/testutil/main.c index 32e32d83287..c94efed25f9 100644 --- a/test/testutil/main.c +++ b/test/testutil/main.c @@ -16,10 +16,13 @@ int main(int argc, char *argv[]) { int ret = EXIT_FAILURE; int setup_res; + int gi_ret; + + gi_ret = global_init(); test_open_streams(); - if (!global_init()) { + if (!gi_ret) { test_printf_stderr("Global init failed - aborting\n"); return ret; } -- 2.47.2