diff --git a/source/evp_setpeer.c b/source/evp_setpeer.c index 797049d8..f27a04b9 100644 --- a/source/evp_setpeer.c +++ b/source/evp_setpeer.c @@ -182,8 +182,6 @@ int main(int argc, char *argv[]) return EXIT_FAILURE; } - max_time = ossl_time_add(ossl_time_now(), ossl_seconds2time(RUN_TIME)); - counts = OPENSSL_malloc(sizeof(OSSL_TIME) * threadcount); if (counts == NULL) { printf("Failed to create counts array\n"); @@ -222,6 +220,8 @@ int main(int argc, char *argv[]) return EXIT_FAILURE; } + max_time = ossl_time_add(ossl_time_now(), ossl_seconds2time(RUN_TIME)); + if (!perflib_run_multi_thread_test(do_setpeer, threadcount, &duration)) { fprintf(stderr, "Failed to run the test %s\n", sample_names[k]); EVP_PKEY_free(pkey);