X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=test%2Fjpaketest.c;h=7b59855d23f9d2e8a3f9bad5c0cac893d2d2508a;hp=2771e511adfc95be32e799be4c90a05085f69f0c;hb=541e9565bb5b860e9e0b5faeb5d474deeaef743b;hpb=bbd86bf5424a611cb6b77a3a17fc522931c4dcb8 diff --git a/test/jpaketest.c b/test/jpaketest.c index 2771e511ad..7b59855d23 100644 --- a/test/jpaketest.c +++ b/test/jpaketest.c @@ -112,12 +112,14 @@ int main(int argc, char **argv) BIGNUM *g = NULL; BIGNUM *q = NULL; BIGNUM *secret = BN_new(); +#ifndef OPENSSL_NO_CRYPTO_MDEBUG BIO *bio_err; bio_err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT); - CRYPTO_set_mem_debug_functions(1) + CRYPTO_set_mem_debug(1); CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); +#endif ERR_load_crypto_strings(); @@ -176,7 +178,10 @@ int main(int argc, char **argv) CRYPTO_cleanup_all_ex_data(); ERR_remove_thread_state(NULL); ERR_free_strings(); - CRYPTO_mem_leaks(bio_err); +#ifndef OPENSSL_NO_CRYPTO_MDEBUG + if (CRYPTO_mem_leaks(bio_err) <= 0) + return 1; +#endif return 0; }