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


test/ssl_test_ctx_test.c:95:1: start of procedure set_up()
93.   }
94.   
95. > static SSL_TEST_CTX_TEST_FIXTURE set_up(const char *const test_case_name)
96.   {
97.       SSL_TEST_CTX_TEST_FIXTURE fixture;

test/ssl_test_ctx_test.c:98:5: 
96.   {
97.       SSL_TEST_CTX_TEST_FIXTURE fixture;
98. >     fixture.test_case_name = test_case_name;
99.       fixture.expected_ctx = SSL_TEST_CTX_new();
100.       OPENSSL_assert(fixture.expected_ctx != NULL);

test/ssl_test_ctx_test.c:99:5: 
97.       SSL_TEST_CTX_TEST_FIXTURE fixture;
98.       fixture.test_case_name = test_case_name;
99. >     fixture.expected_ctx = SSL_TEST_CTX_new();
100.       OPENSSL_assert(fixture.expected_ctx != NULL);
101.       return fixture;

test/ssl_test_ctx.c:311:1: start of procedure SSL_TEST_CTX_new()
  309.    * for malloc failures and other internal errors.
  310.    */
  311. > SSL_TEST_CTX *SSL_TEST_CTX_new()
  312.   {
  313.       SSL_TEST_CTX *ret;

test/ssl_test_ctx.c:314:5: 
  312.   {
  313.       SSL_TEST_CTX *ret;
  314. >     ret = OPENSSL_zalloc(sizeof(*ret));
  315.       OPENSSL_assert(ret != NULL);
  316.       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:315:5: Condition is true
  313.       SSL_TEST_CTX *ret;
  314.       ret = OPENSSL_zalloc(sizeof(*ret));
  315.       OPENSSL_assert(ret != NULL);
             ^
  316.       return ret;
  317.   }

test/ssl_test_ctx.c:316:5: 
  314.       ret = OPENSSL_zalloc(sizeof(*ret));
  315.       OPENSSL_assert(ret != NULL);
  316. >     return ret;
  317.   }
  318.   

test/ssl_test_ctx.c:317:1: return from a call to SSL_TEST_CTX_new
  315.       OPENSSL_assert(ret != NULL);
  316.       return ret;
  317. > }
  318.   
  319.   void SSL_TEST_CTX_free(SSL_TEST_CTX *ctx)

test/ssl_test_ctx_test.c:100:5: Condition is true
98.       fixture.test_case_name = test_case_name;
99.       fixture.expected_ctx = SSL_TEST_CTX_new();
100.       OPENSSL_assert(fixture.expected_ctx != NULL);
           ^
101.       return fixture;
102.   }

test/ssl_test_ctx_test.c:101:5: 
99.       fixture.expected_ctx = SSL_TEST_CTX_new();
100.       OPENSSL_assert(fixture.expected_ctx != NULL);
101. >     return fixture;
102.   }
103.   

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}']