test/cipherlist_test.c:50: error: MEMORY_LEAK
  memory dynamically allocated by call to `CRYPTO_zalloc()` at line 45, column 10 is not reachable after line 50, column 9.
Showing all 45 steps of the trace


test/cipherlist_test.c:41:1: start of procedure set_up()
39.   }
40.   
41. > static CIPHERLIST_TEST_FIXTURE *set_up(const char *const test_case_name)
42.   {
43.       CIPHERLIST_TEST_FIXTURE *fixture;

test/cipherlist_test.c:45:10: 
43.       CIPHERLIST_TEST_FIXTURE *fixture;
44.   
45. >     if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture))))
46.           return NULL;
47.       fixture->test_case_name = test_case_name;

crypto/mem.c:228:1: start of procedure CRYPTO_zalloc()
  226.   }
  227.   
  228. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
  229.   {
  230.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:230:5: 
  228.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
  229.   {
  230. >     void *ret = CRYPTO_malloc(num, file, line);
  231.   
  232.       FAILTEST();

crypto/mem.c:192:1: start of procedure CRYPTO_malloc()
    190.   #endif
    191.   
    192. > void *CRYPTO_malloc(size_t num, const char *file, int line)
    193.   {
    194.       void *ret = NULL;

crypto/mem.c:194:5: 
    192.   void *CRYPTO_malloc(size_t num, const char *file, int line)
    193.   {
    194. >     void *ret = NULL;
    195.   
    196.       INCREMENT(malloc_count);

crypto/mem.c:197:9: Taking false branch
    195.   
    196.       INCREMENT(malloc_count);
    197.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                   ^
    198.           return malloc_impl(num, file, line);
    199.   

crypto/mem.c:200:9: Taking false branch
    198.           return malloc_impl(num, file, line);
    199.   
    200.       if (num == 0)
                   ^
    201.           return NULL;
    202.   

crypto/mem.c:204:9: Taking true branch
    202.   
    203.       FAILTEST();
    204.       if (allow_customize) {
                   ^
    205.           /*
    206.            * Disallow customization after the first allocation. We only set this

crypto/mem.c:210:9: 
    208.            * allocation.
    209.            */
    210. >         allow_customize = 0;
    211.       }
    212.   #if !defined(OPENSSL_NO_CRYPTO_MDEBUG) && !defined(FIPS_MODE)

crypto/mem.c:221:5: 
    219.       }
    220.   #else
    221. >     (void)(file); (void)(line);
    222.       ret = malloc(num);
    223.   #endif

crypto/mem.c:221:19: 
    219.       }
    220.   #else
    221. >     (void)(file); (void)(line);
    222.       ret = malloc(num);
    223.   #endif

crypto/mem.c:222:5: 
    220.   #else
    221.       (void)(file); (void)(line);
    222. >     ret = malloc(num);
    223.   #endif
    224.   

crypto/mem.c:225:5: 
    223.   #endif
    224.   
    225. >     return ret;
    226.   }
    227.   

crypto/mem.c:226:1: return from a call to CRYPTO_malloc
    224.   
    225.       return ret;
    226. > }
    227.   
    228.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:233:9: Taking true branch
  231.   
  232.       FAILTEST();
  233.       if (ret != NULL)
                 ^
  234.           memset(ret, 0, num);
  235.       return ret;

crypto/mem.c:234:9: 
  232.       FAILTEST();
  233.       if (ret != NULL)
  234. >         memset(ret, 0, num);
  235.       return ret;
  236.   }

crypto/mem.c:235:5: 
  233.       if (ret != NULL)
  234.           memset(ret, 0, num);
  235. >     return ret;
  236.   }
  237.   

crypto/mem.c:236:1: return from a call to CRYPTO_zalloc
  234.           memset(ret, 0, num);
  235.       return ret;
  236. > }
  237.   
  238.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

test/testutil/tests.c:229:1: start of procedure test_ptr()
  227.   }
  228.   
  229. > int test_ptr(const char *file, int line, const char *s, const void *p)
  230.   {
  231.       if (p != NULL)

test/testutil/tests.c:231:9: Taking true branch
  229.   int test_ptr(const char *file, int line, const char *s, const void *p)
  230.   {
  231.       if (p != NULL)
                 ^
  232.           return 1;
  233.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);

test/testutil/tests.c:232:9: 
  230.   {
  231.       if (p != NULL)
  232. >         return 1;
  233.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  234.       return 0;

test/testutil/tests.c:235:1: return from a call to test_ptr
  233.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  234.       return 0;
  235. > }
  236.   
  237.   int test_true(const char *file, int line, const char *s, int b)

test/cipherlist_test.c:45:10: Taking false branch
43.       CIPHERLIST_TEST_FIXTURE *fixture;
44.   
45.       if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture))))
               ^
46.           return NULL;
47.       fixture->test_case_name = test_case_name;

test/cipherlist_test.c:47:5: 
45.       if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture))))
46.           return NULL;
47. >     fixture->test_case_name = test_case_name;
48.       if (!TEST_ptr(fixture->server = SSL_CTX_new(TLS_server_method()))
49.               || !TEST_ptr(fixture->client = SSL_CTX_new(TLS_client_method()))) {

test/cipherlist_test.c:48:10: 
46.           return NULL;
47.       fixture->test_case_name = test_case_name;
48. >     if (!TEST_ptr(fixture->server = SSL_CTX_new(TLS_server_method()))
49.               || !TEST_ptr(fixture->client = SSL_CTX_new(TLS_client_method()))) {
50.           tear_down(fixture);

ssl/methods.c:49:1: start of procedure TLS_server_method()
  47.    * TLS/SSLv3 server methods
  48.    */
  49. > IMPLEMENT_tls_meth_func(TLS_ANY_VERSION, 0, 0,
  50.                           TLS_server_method,
  51.                           ossl_statem_accept,

ssl/methods.c:49:1: return from a call to TLS_server_method
  47.    * TLS/SSLv3 server methods
  48.    */
  49. > IMPLEMENT_tls_meth_func(TLS_ANY_VERSION, 0, 0,
  50.                           TLS_server_method,
  51.                           ossl_statem_accept,

test/cipherlist_test.c:48:10: Skipping SSL_CTX_new(): empty list of specs
46.           return NULL;
47.       fixture->test_case_name = test_case_name;
48.       if (!TEST_ptr(fixture->server = SSL_CTX_new(TLS_server_method()))
               ^
49.               || !TEST_ptr(fixture->client = SSL_CTX_new(TLS_client_method()))) {
50.           tear_down(fixture);

test/testutil/tests.c:229:1: start of procedure test_ptr()
  227.   }
  228.   
  229. > int test_ptr(const char *file, int line, const char *s, const void *p)
  230.   {
  231.       if (p != NULL)

test/testutil/tests.c:231:9: Taking true branch
  229.   int test_ptr(const char *file, int line, const char *s, const void *p)
  230.   {
  231.       if (p != NULL)
                 ^
  232.           return 1;
  233.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);

test/testutil/tests.c:232:9: 
  230.   {
  231.       if (p != NULL)
  232. >         return 1;
  233.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  234.       return 0;

test/testutil/tests.c:235:1: return from a call to test_ptr
  233.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  234.       return 0;
  235. > }
  236.   
  237.   int test_true(const char *file, int line, const char *s, int b)

test/cipherlist_test.c:48:10: Taking false branch
46.           return NULL;
47.       fixture->test_case_name = test_case_name;
48.       if (!TEST_ptr(fixture->server = SSL_CTX_new(TLS_server_method()))
               ^
49.               || !TEST_ptr(fixture->client = SSL_CTX_new(TLS_client_method()))) {
50.           tear_down(fixture);

test/cipherlist_test.c:49:17: 
47.       fixture->test_case_name = test_case_name;
48.       if (!TEST_ptr(fixture->server = SSL_CTX_new(TLS_server_method()))
49. >             || !TEST_ptr(fixture->client = SSL_CTX_new(TLS_client_method()))) {
50.           tear_down(fixture);
51.           return NULL;

ssl/methods.c:82:1: start of procedure TLS_client_method()
  80.    * TLS/SSLv3 client methods
  81.    */
  82. > IMPLEMENT_tls_meth_func(TLS_ANY_VERSION, 0, 0,
  83.                           TLS_client_method,
  84.                           ssl_undefined_function,

ssl/methods.c:82:1: return from a call to TLS_client_method
  80.    * TLS/SSLv3 client methods
  81.    */
  82. > IMPLEMENT_tls_meth_func(TLS_ANY_VERSION, 0, 0,
  83.                           TLS_client_method,
  84.                           ssl_undefined_function,

test/cipherlist_test.c:49:17: Skipping SSL_CTX_new(): empty list of specs
47.       fixture->test_case_name = test_case_name;
48.       if (!TEST_ptr(fixture->server = SSL_CTX_new(TLS_server_method()))
49.               || !TEST_ptr(fixture->client = SSL_CTX_new(TLS_client_method()))) {
                      ^
50.           tear_down(fixture);
51.           return NULL;

test/testutil/tests.c:229:1: start of procedure test_ptr()
  227.   }
  228.   
  229. > int test_ptr(const char *file, int line, const char *s, const void *p)
  230.   {
  231.       if (p != NULL)

test/testutil/tests.c:231:9: Taking false branch
  229.   int test_ptr(const char *file, int line, const char *s, const void *p)
  230.   {
  231.       if (p != NULL)
                 ^
  232.           return 1;
  233.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);

test/testutil/tests.c:233:5: Skipping test_fail_message(): empty list of specs
  231.       if (p != NULL)
  232.           return 1;
  233.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
             ^
  234.       return 0;
  235.   }

test/testutil/tests.c:234:5: 
  232.           return 1;
  233.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  234. >     return 0;
  235.   }
  236.   

test/testutil/tests.c:235:1: return from a call to test_ptr
  233.       test_fail_message(NULL, file, line, "ptr", s, "NULL", "!=", "%p", p);
  234.       return 0;
  235. > }
  236.   
  237.   int test_true(const char *file, int line, const char *s, int b)

test/cipherlist_test.c:49:17: Taking true branch
47.       fixture->test_case_name = test_case_name;
48.       if (!TEST_ptr(fixture->server = SSL_CTX_new(TLS_server_method()))
49.               || !TEST_ptr(fixture->client = SSL_CTX_new(TLS_client_method()))) {
                      ^
50.           tear_down(fixture);
51.           return NULL;

test/cipherlist_test.c:50:9: Skipping tear_down(): empty list of specs
48.       if (!TEST_ptr(fixture->server = SSL_CTX_new(TLS_server_method()))
49.               || !TEST_ptr(fixture->client = SSL_CTX_new(TLS_client_method()))) {
50.           tear_down(fixture);
              ^
51.           return NULL;
52.       }
