test/ssl_test_ctx_test.c:127: error: MEMORY_LEAK
  memory dynamically allocated by call to `SSL_TEST_CTX_new()` at line 125, column 28 is not reachable after line 127, column 5.
Showing all 26 steps of the trace


test/ssl_test_ctx_test.c:121:1: start of procedure set_up()
119.   }
120.   
121. > static SSL_TEST_CTX_TEST_FIXTURE set_up(const char *const test_case_name)
122.   {
123.       SSL_TEST_CTX_TEST_FIXTURE fixture;

test/ssl_test_ctx_test.c:124:5: 
122.   {
123.       SSL_TEST_CTX_TEST_FIXTURE fixture;
124. >     fixture.test_case_name = test_case_name;
125.       fixture.expected_ctx = SSL_TEST_CTX_new();
126.       OPENSSL_assert(fixture.expected_ctx != NULL);

test/ssl_test_ctx_test.c:125:5: 
123.       SSL_TEST_CTX_TEST_FIXTURE fixture;
124.       fixture.test_case_name = test_case_name;
125. >     fixture.expected_ctx = SSL_TEST_CTX_new();
126.       OPENSSL_assert(fixture.expected_ctx != NULL);
127.       return fixture;

test/ssl_test_ctx.c:341:1: start of procedure SSL_TEST_CTX_new()
  339.    * for malloc failures and other internal errors.
  340.    */
  341. > SSL_TEST_CTX *SSL_TEST_CTX_new()
  342.   {
  343.       SSL_TEST_CTX *ret;

test/ssl_test_ctx.c:344:5: 
  342.   {
  343.       SSL_TEST_CTX *ret;
  344. >     ret = OPENSSL_zalloc(sizeof(*ret));
  345.       OPENSSL_assert(ret != NULL);
  346.       return ret;

crypto/mem.c:98:1: start of procedure CRYPTO_zalloc()
    96.   }
    97.   
    98. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
    99.   {
    100.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:100:5: 
    98.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
    99.   {
    100. >     void *ret = CRYPTO_malloc(num, file, line);
    101.   
    102.       if (ret != NULL)

crypto/mem.c:71:1: start of procedure CRYPTO_malloc()
      69.   }
      70.   
      71. > void *CRYPTO_malloc(size_t num, const char *file, int line)
      72.   {
      73.       void *ret = NULL;

crypto/mem.c:73:5: 
      71.   void *CRYPTO_malloc(size_t num, const char *file, int line)
      72.   {
      73. >     void *ret = NULL;
      74.   
      75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:75:9: Taking false branch
      73.       void *ret = NULL;
      74.   
      75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                    ^
      76.           return malloc_impl(num, file, line);
      77.   

crypto/mem.c:78:9: Taking false branch
      76.           return malloc_impl(num, file, line);
      77.   
      78.       if (num <= 0)
                    ^
      79.           return NULL;
      80.   

crypto/mem.c:81:5: 
      79.           return NULL;
      80.   
      81. >     allow_customize = 0;
      82.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
      83.       if (call_malloc_debug) {

crypto/mem.c:91:5: 
      89.       }
      90.   #else
      91. >     osslargused(file); osslargused(line);
      92.       ret = malloc(num);
      93.   #endif

crypto/mem.c:91:24: 
      89.       }
      90.   #else
      91. >     osslargused(file); osslargused(line);
      92.       ret = malloc(num);
      93.   #endif

crypto/mem.c:92:5: 
      90.   #else
      91.       osslargused(file); osslargused(line);
      92. >     ret = malloc(num);
      93.   #endif
      94.   

crypto/mem.c:95:5: 
      93.   #endif
      94.   
      95. >     return ret;
      96.   }
      97.   

crypto/mem.c:96:1: return from a call to CRYPTO_malloc
      94.   
      95.       return ret;
      96. > }
      97.   
      98.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:102:9: Taking true branch
    100.       void *ret = CRYPTO_malloc(num, file, line);
    101.   
    102.       if (ret != NULL)
                   ^
    103.           memset(ret, 0, num);
    104.       return ret;

crypto/mem.c:103:9: 
    101.   
    102.       if (ret != NULL)
    103. >         memset(ret, 0, num);
    104.       return ret;
    105.   }

crypto/mem.c:104:5: 
    102.       if (ret != NULL)
    103.           memset(ret, 0, num);
    104. >     return ret;
    105.   }
    106.   

crypto/mem.c:105:1: return from a call to CRYPTO_zalloc
    103.           memset(ret, 0, num);
    104.       return ret;
    105. > }
    106.   
    107.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

test/ssl_test_ctx.c:345:5: Condition is true
  343.       SSL_TEST_CTX *ret;
  344.       ret = OPENSSL_zalloc(sizeof(*ret));
  345.       OPENSSL_assert(ret != NULL);
             ^
  346.       return ret;
  347.   }

test/ssl_test_ctx.c:346:5: 
  344.       ret = OPENSSL_zalloc(sizeof(*ret));
  345.       OPENSSL_assert(ret != NULL);
  346. >     return ret;
  347.   }
  348.   

test/ssl_test_ctx.c:347:1: return from a call to SSL_TEST_CTX_new
  345.       OPENSSL_assert(ret != NULL);
  346.       return ret;
  347. > }
  348.   
  349.   void SSL_TEST_CTX_free(SSL_TEST_CTX *ctx)

test/ssl_test_ctx_test.c:126:5: Condition is true
124.       fixture.test_case_name = test_case_name;
125.       fixture.expected_ctx = SSL_TEST_CTX_new();
126.       OPENSSL_assert(fixture.expected_ctx != NULL);
           ^
127.       return fixture;
128.   }

test/ssl_test_ctx_test.c:127:5: 
125.       fixture.expected_ctx = SSL_TEST_CTX_new();
126.       OPENSSL_assert(fixture.expected_ctx != NULL);
127. >     return fixture;
128.   }
129.   
