From: Eugene Syromiatnikov Date: Wed, 30 Jul 2025 14:54:09 +0000 (+0200) Subject: test/testutil/main.c: move global_init before test_open_streams X-Git-Tag: openssl-3.6.0-alpha1~205 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39029a1bb0cd10de986239c9fc58228c2501a5f4;p=thirdparty%2Fopenssl.git test/testutil/main.c: move global_init before test_open_streams 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) --- 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; }