test/evp_test.c:1880: error: MEMORY_LEAK
  memory dynamically allocated to `encode_ctx` by call to `EVP_ENCODE_CTX_new()` at line 1876, column 38 is not reachable after line 1880, column 13.
Showing all 55 steps of the trace


test/evp_test.c:1864:1: start of procedure encode_test_run()
1862.   }
1863.   
1864. > static int encode_test_run(struct evp_test *t)
1865.   {
1866.       struct encode_data *edata = t->data;

test/evp_test.c:1866:5: 
1864.   static int encode_test_run(struct evp_test *t)
1865.   {
1866. >     struct encode_data *edata = t->data;
1867.       unsigned char *encode_out = NULL, *decode_out = NULL;
1868.       int output_len, chunk_len;

test/evp_test.c:1867:5: 
1865.   {
1866.       struct encode_data *edata = t->data;
1867. >     unsigned char *encode_out = NULL, *decode_out = NULL;
1868.       int output_len, chunk_len;
1869.       const char *err = "INTERNAL_ERROR";

test/evp_test.c:1869:5: 
1867.       unsigned char *encode_out = NULL, *decode_out = NULL;
1868.       int output_len, chunk_len;
1869. >     const char *err = "INTERNAL_ERROR";
1870.       EVP_ENCODE_CTX *decode_ctx = EVP_ENCODE_CTX_new();
1871.   

test/evp_test.c:1870:5: 
1868.       int output_len, chunk_len;
1869.       const char *err = "INTERNAL_ERROR";
1870. >     EVP_ENCODE_CTX *decode_ctx = EVP_ENCODE_CTX_new();
1871.   
1872.       if (decode_ctx == NULL)

crypto/evp/encode.c:96:1: start of procedure EVP_ENCODE_CTX_new()
  94.   #endif
  95.   
  96. > EVP_ENCODE_CTX *EVP_ENCODE_CTX_new(void)
  97.   {
  98.       return OPENSSL_zalloc(sizeof(EVP_ENCODE_CTX));

crypto/evp/encode.c:98:5: 
  96.   EVP_ENCODE_CTX *EVP_ENCODE_CTX_new(void)
  97.   {
  98. >     return OPENSSL_zalloc(sizeof(EVP_ENCODE_CTX));
  99.   }
  100.   

crypto/mem.c:186:1: start of procedure CRYPTO_zalloc()
    184.   }
    185.   
    186. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
    187.   {
    188.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:188:5: 
    186.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
    187.   {
    188. >     void *ret = CRYPTO_malloc(num, file, line);
    189.   
    190.       FAILTEST();

crypto/mem.c:158:1: start of procedure CRYPTO_malloc()
      156.   #endif
      157.   
      158. > void *CRYPTO_malloc(size_t num, const char *file, int line)
      159.   {
      160.       void *ret = NULL;

crypto/mem.c:160:5: 
      158.   void *CRYPTO_malloc(size_t num, const char *file, int line)
      159.   {
      160. >     void *ret = NULL;
      161.   
      162.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:162:9: Taking false branch
      160.       void *ret = NULL;
      161.   
      162.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                     ^
      163.           return malloc_impl(num, file, line);
      164.   

crypto/mem.c:165:9: Taking false branch
      163.           return malloc_impl(num, file, line);
      164.   
      165.       if (num <= 0)
                     ^
      166.           return NULL;
      167.   

crypto/mem.c:169:5: 
      167.   
      168.       FAILTEST();
      169. >     allow_customize = 0;
      170.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
      171.       if (call_malloc_debug) {

crypto/mem.c:179:5: 
      177.       }
      178.   #else
      179. >     osslargused(file); osslargused(line);
      180.       ret = malloc(num);
      181.   #endif

crypto/mem.c:179:24: 
      177.       }
      178.   #else
      179. >     osslargused(file); osslargused(line);
      180.       ret = malloc(num);
      181.   #endif

crypto/mem.c:180:5: 
      178.   #else
      179.       osslargused(file); osslargused(line);
      180. >     ret = malloc(num);
      181.   #endif
      182.   

crypto/mem.c:183:5: 
      181.   #endif
      182.   
      183. >     return ret;
      184.   }
      185.   

crypto/mem.c:184:1: return from a call to CRYPTO_malloc
      182.   
      183.       return ret;
      184. > }
      185.   
      186.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:191:9: Taking true branch
    189.   
    190.       FAILTEST();
    191.       if (ret != NULL)
                   ^
    192.           memset(ret, 0, num);
    193.       return ret;

crypto/mem.c:192:9: 
    190.       FAILTEST();
    191.       if (ret != NULL)
    192. >         memset(ret, 0, num);
    193.       return ret;
    194.   }

crypto/mem.c:193:5: 
    191.       if (ret != NULL)
    192.           memset(ret, 0, num);
    193. >     return ret;
    194.   }
    195.   

crypto/mem.c:194:1: return from a call to CRYPTO_zalloc
    192.           memset(ret, 0, num);
    193.       return ret;
    194. > }
    195.   
    196.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/evp/encode.c:99:1: return from a call to EVP_ENCODE_CTX_new
  97.   {
  98.       return OPENSSL_zalloc(sizeof(EVP_ENCODE_CTX));
  99. > }
  100.   
  101.   void EVP_ENCODE_CTX_free(EVP_ENCODE_CTX *ctx)

test/evp_test.c:1872:9: Taking false branch
1870.       EVP_ENCODE_CTX *decode_ctx = EVP_ENCODE_CTX_new();
1871.   
1872.       if (decode_ctx == NULL)
                ^
1873.           goto err;
1874.   

test/evp_test.c:1875:9: Taking true branch
1873.           goto err;
1874.   
1875.       if (edata->encoding == BASE64_CANONICAL_ENCODING) {
                ^
1876.           EVP_ENCODE_CTX *encode_ctx = EVP_ENCODE_CTX_new();
1877.           if (encode_ctx == NULL)

test/evp_test.c:1876:9: 
1874.   
1875.       if (edata->encoding == BASE64_CANONICAL_ENCODING) {
1876. >         EVP_ENCODE_CTX *encode_ctx = EVP_ENCODE_CTX_new();
1877.           if (encode_ctx == NULL)
1878.               goto err;

crypto/evp/encode.c:96:1: start of procedure EVP_ENCODE_CTX_new()
  94.   #endif
  95.   
  96. > EVP_ENCODE_CTX *EVP_ENCODE_CTX_new(void)
  97.   {
  98.       return OPENSSL_zalloc(sizeof(EVP_ENCODE_CTX));

crypto/evp/encode.c:98:5: 
  96.   EVP_ENCODE_CTX *EVP_ENCODE_CTX_new(void)
  97.   {
  98. >     return OPENSSL_zalloc(sizeof(EVP_ENCODE_CTX));
  99.   }
  100.   

crypto/mem.c:186:1: start of procedure CRYPTO_zalloc()
    184.   }
    185.   
    186. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
    187.   {
    188.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:188:5: 
    186.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
    187.   {
    188. >     void *ret = CRYPTO_malloc(num, file, line);
    189.   
    190.       FAILTEST();

crypto/mem.c:158:1: start of procedure CRYPTO_malloc()
      156.   #endif
      157.   
      158. > void *CRYPTO_malloc(size_t num, const char *file, int line)
      159.   {
      160.       void *ret = NULL;

crypto/mem.c:160:5: 
      158.   void *CRYPTO_malloc(size_t num, const char *file, int line)
      159.   {
      160. >     void *ret = NULL;
      161.   
      162.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:162:9: Taking false branch
      160.       void *ret = NULL;
      161.   
      162.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                     ^
      163.           return malloc_impl(num, file, line);
      164.   

crypto/mem.c:165:9: Taking false branch
      163.           return malloc_impl(num, file, line);
      164.   
      165.       if (num <= 0)
                     ^
      166.           return NULL;
      167.   

crypto/mem.c:169:5: 
      167.   
      168.       FAILTEST();
      169. >     allow_customize = 0;
      170.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
      171.       if (call_malloc_debug) {

crypto/mem.c:179:5: 
      177.       }
      178.   #else
      179. >     osslargused(file); osslargused(line);
      180.       ret = malloc(num);
      181.   #endif

crypto/mem.c:179:24: 
      177.       }
      178.   #else
      179. >     osslargused(file); osslargused(line);
      180.       ret = malloc(num);
      181.   #endif

crypto/mem.c:180:5: 
      178.   #else
      179.       osslargused(file); osslargused(line);
      180. >     ret = malloc(num);
      181.   #endif
      182.   

crypto/mem.c:183:5: 
      181.   #endif
      182.   
      183. >     return ret;
      184.   }
      185.   

crypto/mem.c:184:1: return from a call to CRYPTO_malloc
      182.   
      183.       return ret;
      184. > }
      185.   
      186.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:191:9: Taking true branch
    189.   
    190.       FAILTEST();
    191.       if (ret != NULL)
                   ^
    192.           memset(ret, 0, num);
    193.       return ret;

crypto/mem.c:192:9: 
    190.       FAILTEST();
    191.       if (ret != NULL)
    192. >         memset(ret, 0, num);
    193.       return ret;
    194.   }

crypto/mem.c:193:5: 
    191.       if (ret != NULL)
    192.           memset(ret, 0, num);
    193. >     return ret;
    194.   }
    195.   

crypto/mem.c:194:1: return from a call to CRYPTO_zalloc
    192.           memset(ret, 0, num);
    193.       return ret;
    194. > }
    195.   
    196.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/evp/encode.c:99:1: return from a call to EVP_ENCODE_CTX_new
  97.   {
  98.       return OPENSSL_zalloc(sizeof(EVP_ENCODE_CTX));
  99. > }
  100.   
  101.   void EVP_ENCODE_CTX_free(EVP_ENCODE_CTX *ctx)

test/evp_test.c:1877:13: Taking false branch
1875.       if (edata->encoding == BASE64_CANONICAL_ENCODING) {
1876.           EVP_ENCODE_CTX *encode_ctx = EVP_ENCODE_CTX_new();
1877.           if (encode_ctx == NULL)
                    ^
1878.               goto err;
1879.           encode_out = OPENSSL_malloc(EVP_ENCODE_LENGTH(edata->input_len));

test/evp_test.c:1879:9: 
1877.           if (encode_ctx == NULL)
1878.               goto err;
1879. >         encode_out = OPENSSL_malloc(EVP_ENCODE_LENGTH(edata->input_len));
1880.           if (encode_out == NULL)
1881.               goto err;

crypto/mem.c:158:1: start of procedure CRYPTO_malloc()
  156.   #endif
  157.   
  158. > void *CRYPTO_malloc(size_t num, const char *file, int line)
  159.   {
  160.       void *ret = NULL;

crypto/mem.c:160:5: 
  158.   void *CRYPTO_malloc(size_t num, const char *file, int line)
  159.   {
  160. >     void *ret = NULL;
  161.   
  162.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:162:9: Taking true branch
  160.       void *ret = NULL;
  161.   
  162.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                 ^
  163.           return malloc_impl(num, file, line);
  164.   

crypto/mem.c:162:32: Taking true branch
  160.       void *ret = NULL;
  161.   
  162.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                                        ^
  163.           return malloc_impl(num, file, line);
  164.   

crypto/mem.c:163:9: Skipping __function_pointer__(): unresolved function pointer
  161.   
  162.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
  163.           return malloc_impl(num, file, line);
                 ^
  164.   
  165.       if (num <= 0)

crypto/mem.c:184:1: return from a call to CRYPTO_malloc
  182.   
  183.       return ret;
  184. > }
  185.   
  186.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

test/evp_test.c:1880:13: Taking true branch
1878.               goto err;
1879.           encode_out = OPENSSL_malloc(EVP_ENCODE_LENGTH(edata->input_len));
1880.           if (encode_out == NULL)
                    ^
1881.               goto err;
1882.   
