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


test/ssl_test_ctx_test.c:139:1: start of procedure set_up()
137.   }
138.   
139. > static SSL_TEST_CTX_TEST_FIXTURE set_up(const char *const test_case_name)
140.   {
141.       SSL_TEST_CTX_TEST_FIXTURE fixture;

test/ssl_test_ctx_test.c:142:5: 
140.   {
141.       SSL_TEST_CTX_TEST_FIXTURE fixture;
142. >     fixture.test_case_name = test_case_name;
143.       fixture.expected_ctx = SSL_TEST_CTX_new();
144.       OPENSSL_assert(fixture.expected_ctx != NULL);

test/ssl_test_ctx_test.c:143:5: 
141.       SSL_TEST_CTX_TEST_FIXTURE fixture;
142.       fixture.test_case_name = test_case_name;
143. >     fixture.expected_ctx = SSL_TEST_CTX_new();
144.       OPENSSL_assert(fixture.expected_ctx != NULL);
145.       return fixture;

test/ssl_test_ctx.c:395:1: start of procedure SSL_TEST_CTX_new()
  393.    * for malloc failures and other internal errors.
  394.    */
  395. > SSL_TEST_CTX *SSL_TEST_CTX_new()
  396.   {
  397.       SSL_TEST_CTX *ret;

test/ssl_test_ctx.c:398:5: 
  396.   {
  397.       SSL_TEST_CTX *ret;
  398. >     ret = OPENSSL_zalloc(sizeof(*ret));
  399.       OPENSSL_assert(ret != NULL);
  400.       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:399:5: Condition is true
  397.       SSL_TEST_CTX *ret;
  398.       ret = OPENSSL_zalloc(sizeof(*ret));
  399.       OPENSSL_assert(ret != NULL);
             ^
  400.       return ret;
  401.   }

test/ssl_test_ctx.c:400:5: 
  398.       ret = OPENSSL_zalloc(sizeof(*ret));
  399.       OPENSSL_assert(ret != NULL);
  400. >     return ret;
  401.   }
  402.   

test/ssl_test_ctx.c:401:1: return from a call to SSL_TEST_CTX_new
  399.       OPENSSL_assert(ret != NULL);
  400.       return ret;
  401. > }
  402.   
  403.   void SSL_TEST_CTX_free(SSL_TEST_CTX *ctx)

test/ssl_test_ctx_test.c:144:5: Condition is true
142.       fixture.test_case_name = test_case_name;
143.       fixture.expected_ctx = SSL_TEST_CTX_new();
144.       OPENSSL_assert(fixture.expected_ctx != NULL);
           ^
145.       return fixture;
146.   }

test/ssl_test_ctx_test.c:145:5: 
143.       fixture.expected_ctx = SSL_TEST_CTX_new();
144.       OPENSSL_assert(fixture.expected_ctx != NULL);
145. >     return fixture;
146.   }
147.   

static SSL_TEST_CTX_TEST_FIXTURE set_up(const char *const test_case_name)
{
    SSL_TEST_CTX_TEST_FIXTURE fixture;
    fixture.test_case_name = test_case_name;
    fixture.expected_ctx = SSL_TEST_CTX_new();
    OPENSSL_assert(fixture.expected_ctx != NULL);
    return fixture;
}
['static SSL_TEST_CTX_TEST_FIXTURE set_up(const char *const test_case_name)\n{\n    SSL_TEST_CTX_TEST_FIXTURE fixture;\n    fixture.test_case_name = test_case_name;\n    fixture.expected_ctx = SSL_TEST_CTX_new();\n    OPENSSL_assert(fixture.expected_ctx != NULL);\n    return fixture;\n}', 'SSL_TEST_CTX *SSL_TEST_CTX_new()\n{\n    SSL_TEST_CTX *ret;\n    ret = OPENSSL_zalloc(sizeof(*ret));\n    OPENSSL_assert(ret != NULL);\n    return ret;\n}', 'void *CRYPTO_zalloc(size_t num, const char *file, int line)\n{\n    void *ret = CRYPTO_malloc(num, file, line);\n    if (ret != NULL)\n        memset(ret, 0, num);\n    return ret;\n}', 'void *CRYPTO_malloc(size_t num, const char *file, int line)\n{\n    void *ret = NULL;\n    if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)\n        return malloc_impl(num, file, line);\n    if (num <= 0)\n        return NULL;\n    allow_customize = 0;\n#ifndef OPENSSL_NO_CRYPTO_MDEBUG\n    if (call_malloc_debug) {\n        CRYPTO_mem_debug_malloc(NULL, num, 0, file, line);\n        ret = malloc(num);\n        CRYPTO_mem_debug_malloc(ret, num, 1, file, line);\n    } else {\n        ret = malloc(num);\n    }\n#else\n    osslargused(file); osslargused(line);\n    ret = malloc(num);\n#endif\n    return ret;\n}']