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


test/evp_test.c:1590:1: start of procedure encode_test_run()
1588.   }
1589.   
1590. > static int encode_test_run(struct evp_test *t)
1591.   {
1592.       struct encode_data *edata = t->data;

test/evp_test.c:1592:5: 
1590.   static int encode_test_run(struct evp_test *t)
1591.   {
1592. >     struct encode_data *edata = t->data;
1593.       unsigned char *encode_out = NULL, *decode_out = NULL;
1594.       int output_len, chunk_len;

test/evp_test.c:1593:5: 
1591.   {
1592.       struct encode_data *edata = t->data;
1593. >     unsigned char *encode_out = NULL, *decode_out = NULL;
1594.       int output_len, chunk_len;
1595.       const char *err = "INTERNAL_ERROR";

test/evp_test.c:1595:5: 
1593.       unsigned char *encode_out = NULL, *decode_out = NULL;
1594.       int output_len, chunk_len;
1595. >     const char *err = "INTERNAL_ERROR";
1596.       EVP_ENCODE_CTX *decode_ctx = EVP_ENCODE_CTX_new();
1597.   

test/evp_test.c:1596:5: 
1594.       int output_len, chunk_len;
1595.       const char *err = "INTERNAL_ERROR";
1596. >     EVP_ENCODE_CTX *decode_ctx = EVP_ENCODE_CTX_new();
1597.   
1598.       if (decode_ctx == NULL)

crypto/evp/encode.c:144:1: start of procedure EVP_ENCODE_CTX_new()
  142.   #endif
  143.   
  144. > EVP_ENCODE_CTX *EVP_ENCODE_CTX_new(void)
  145.   {
  146.       return (EVP_ENCODE_CTX *)OPENSSL_zalloc(sizeof(EVP_ENCODE_CTX));

crypto/evp/encode.c:146:5: 
  144.   EVP_ENCODE_CTX *EVP_ENCODE_CTX_new(void)
  145.   {
  146. >     return (EVP_ENCODE_CTX *)OPENSSL_zalloc(sizeof(EVP_ENCODE_CTX));
  147.   }
  148.   

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

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

crypto/mem.c:120:1: start of procedure CRYPTO_malloc()
      118.   }
      119.   
      120. > void *CRYPTO_malloc(size_t num, const char *file, int line)
      121.   {
      122.       void *ret = NULL;

crypto/mem.c:122:5: 
      120.   void *CRYPTO_malloc(size_t num, const char *file, int line)
      121.   {
      122. >     void *ret = NULL;
      123.   
      124.       if (num <= 0)

crypto/mem.c:124:9: Taking false branch
      122.       void *ret = NULL;
      123.   
      124.       if (num <= 0)
                     ^
      125.           return NULL;
      126.   

crypto/mem.c:127:5: 
      125.           return NULL;
      126.   
      127. >     allow_customize = 0;
      128.   #ifdef CRYPTO_MDEBUG
      129.       if (call_malloc_debug) {

crypto/mem.c:137:5: 
      135.       }
      136.   #else
      137. >     (void)file;
      138.       (void)line;
      139.       ret = malloc(num);

crypto/mem.c:138:5: 
      136.   #else
      137.       (void)file;
      138. >     (void)line;
      139.       ret = malloc(num);
      140.   #endif

crypto/mem.c:139:5: 
      137.       (void)file;
      138.       (void)line;
      139. >     ret = malloc(num);
      140.   #endif
      141.   

crypto/mem.c:154:5: 
      152.   #endif
      153.   
      154. >     return ret;
      155.   }
      156.   

crypto/mem.c:155:1: return from a call to CRYPTO_malloc
      153.   
      154.       return ret;
      155. > }
      156.   
      157.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

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

crypto/mem.c:162:9: 
    160.   
    161.       if (ret != NULL)
    162. >         memset(ret, 0, num);
    163.       return ret;
    164.   }

crypto/mem.c:163:5: 
    161.       if (ret != NULL)
    162.           memset(ret, 0, num);
    163. >     return ret;
    164.   }
    165.   

crypto/mem.c:164:1: return from a call to CRYPTO_zalloc
    162.           memset(ret, 0, num);
    163.       return ret;
    164. > }
    165.   
    166.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/evp/encode.c:147:1: return from a call to EVP_ENCODE_CTX_new
  145.   {
  146.       return (EVP_ENCODE_CTX *)OPENSSL_zalloc(sizeof(EVP_ENCODE_CTX));
  147. > }
  148.   
  149.   void EVP_ENCODE_CTX_free(EVP_ENCODE_CTX *ctx)

test/evp_test.c:1598:9: Taking false branch
1596.       EVP_ENCODE_CTX *decode_ctx = EVP_ENCODE_CTX_new();
1597.   
1598.       if (decode_ctx == NULL)
                ^
1599.           goto err;
1600.   

test/evp_test.c:1601:9: Taking true branch
1599.           goto err;
1600.   
1601.       if (edata->encoding == BASE64_CANONICAL_ENCODING) {
                ^
1602.           EVP_ENCODE_CTX *encode_ctx = EVP_ENCODE_CTX_new();
1603.           if (encode_ctx == NULL)

test/evp_test.c:1602:9: 
1600.   
1601.       if (edata->encoding == BASE64_CANONICAL_ENCODING) {
1602. >         EVP_ENCODE_CTX *encode_ctx = EVP_ENCODE_CTX_new();
1603.           if (encode_ctx == NULL)
1604.               goto err;

crypto/evp/encode.c:144:1: start of procedure EVP_ENCODE_CTX_new()
  142.   #endif
  143.   
  144. > EVP_ENCODE_CTX *EVP_ENCODE_CTX_new(void)
  145.   {
  146.       return (EVP_ENCODE_CTX *)OPENSSL_zalloc(sizeof(EVP_ENCODE_CTX));

crypto/evp/encode.c:146:5: 
  144.   EVP_ENCODE_CTX *EVP_ENCODE_CTX_new(void)
  145.   {
  146. >     return (EVP_ENCODE_CTX *)OPENSSL_zalloc(sizeof(EVP_ENCODE_CTX));
  147.   }
  148.   

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

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

crypto/mem.c:120:1: start of procedure CRYPTO_malloc()
      118.   }
      119.   
      120. > void *CRYPTO_malloc(size_t num, const char *file, int line)
      121.   {
      122.       void *ret = NULL;

crypto/mem.c:122:5: 
      120.   void *CRYPTO_malloc(size_t num, const char *file, int line)
      121.   {
      122. >     void *ret = NULL;
      123.   
      124.       if (num <= 0)

crypto/mem.c:124:9: Taking false branch
      122.       void *ret = NULL;
      123.   
      124.       if (num <= 0)
                     ^
      125.           return NULL;
      126.   

crypto/mem.c:127:5: 
      125.           return NULL;
      126.   
      127. >     allow_customize = 0;
      128.   #ifdef CRYPTO_MDEBUG
      129.       if (call_malloc_debug) {

crypto/mem.c:137:5: 
      135.       }
      136.   #else
      137. >     (void)file;
      138.       (void)line;
      139.       ret = malloc(num);

crypto/mem.c:138:5: 
      136.   #else
      137.       (void)file;
      138. >     (void)line;
      139.       ret = malloc(num);
      140.   #endif

crypto/mem.c:139:5: 
      137.       (void)file;
      138.       (void)line;
      139. >     ret = malloc(num);
      140.   #endif
      141.   

crypto/mem.c:154:5: 
      152.   #endif
      153.   
      154. >     return ret;
      155.   }
      156.   

crypto/mem.c:155:1: return from a call to CRYPTO_malloc
      153.   
      154.       return ret;
      155. > }
      156.   
      157.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

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

crypto/mem.c:162:9: 
    160.   
    161.       if (ret != NULL)
    162. >         memset(ret, 0, num);
    163.       return ret;
    164.   }

crypto/mem.c:163:5: 
    161.       if (ret != NULL)
    162.           memset(ret, 0, num);
    163. >     return ret;
    164.   }
    165.   

crypto/mem.c:164:1: return from a call to CRYPTO_zalloc
    162.           memset(ret, 0, num);
    163.       return ret;
    164. > }
    165.   
    166.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/evp/encode.c:147:1: return from a call to EVP_ENCODE_CTX_new
  145.   {
  146.       return (EVP_ENCODE_CTX *)OPENSSL_zalloc(sizeof(EVP_ENCODE_CTX));
  147. > }
  148.   
  149.   void EVP_ENCODE_CTX_free(EVP_ENCODE_CTX *ctx)

test/evp_test.c:1603:13: Taking false branch
1601.       if (edata->encoding == BASE64_CANONICAL_ENCODING) {
1602.           EVP_ENCODE_CTX *encode_ctx = EVP_ENCODE_CTX_new();
1603.           if (encode_ctx == NULL)
                    ^
1604.               goto err;
1605.           encode_out = OPENSSL_malloc(EVP_ENCODE_LENGTH(edata->input_len));

test/evp_test.c:1605:9: 
1603.           if (encode_ctx == NULL)
1604.               goto err;
1605. >         encode_out = OPENSSL_malloc(EVP_ENCODE_LENGTH(edata->input_len));
1606.           if (encode_out == NULL)
1607.               goto err;

crypto/mem.c:120:1: start of procedure CRYPTO_malloc()
  118.   }
  119.   
  120. > void *CRYPTO_malloc(size_t num, const char *file, int line)
  121.   {
  122.       void *ret = NULL;

crypto/mem.c:122:5: 
  120.   void *CRYPTO_malloc(size_t num, const char *file, int line)
  121.   {
  122. >     void *ret = NULL;
  123.   
  124.       if (num <= 0)

crypto/mem.c:124:9: Taking false branch
  122.       void *ret = NULL;
  123.   
  124.       if (num <= 0)
                 ^
  125.           return NULL;
  126.   

crypto/mem.c:127:5: 
  125.           return NULL;
  126.   
  127. >     allow_customize = 0;
  128.   #ifdef CRYPTO_MDEBUG
  129.       if (call_malloc_debug) {

crypto/mem.c:137:5: 
  135.       }
  136.   #else
  137. >     (void)file;
  138.       (void)line;
  139.       ret = malloc(num);

crypto/mem.c:138:5: 
  136.   #else
  137.       (void)file;
  138. >     (void)line;
  139.       ret = malloc(num);
  140.   #endif

crypto/mem.c:139:5: 
  137.       (void)file;
  138.       (void)line;
  139. >     ret = malloc(num);
  140.   #endif
  141.   

crypto/mem.c:154:5: 
  152.   #endif
  153.   
  154. >     return ret;
  155.   }
  156.   

crypto/mem.c:155:1: return from a call to CRYPTO_malloc
  153.   
  154.       return ret;
  155. > }
  156.   
  157.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

test/evp_test.c:1606:13: Taking true branch
1604.               goto err;
1605.           encode_out = OPENSSL_malloc(EVP_ENCODE_LENGTH(edata->input_len));
1606.           if (encode_out == NULL)
                    ^
1607.               goto err;
1608.   
