crypto/asn1/a_digest.c:89: error: MEMORY_LEAK
  memory dynamically allocated to `return` by call to `CRYPTO_malloc()` at line 81, column 16 is not reachable after line 89, column 9.
Showing all 40 steps of the trace


crypto/asn1/a_digest.c:74:1: start of procedure ASN1_digest()
72.   #ifndef NO_ASN1_OLD
73.   
74. > int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data,
75.                   unsigned char *md, unsigned int *len)
76.   {

crypto/asn1/a_digest.c:80:5: Skipping __function_pointer__(): unresolved function pointer
78.       unsigned char *str, *p;
79.   
80.       i = i2d(data, NULL);
          ^
81.       if ((str = OPENSSL_malloc(i)) == NULL) {
82.           ASN1err(ASN1_F_ASN1_DIGEST, ERR_R_MALLOC_FAILURE);

crypto/asn1/a_digest.c:81:9: 
79.   
80.       i = i2d(data, NULL);
81. >     if ((str = OPENSSL_malloc(i)) == NULL) {
82.           ASN1err(ASN1_F_ASN1_DIGEST, ERR_R_MALLOC_FAILURE);
83.           return (0);

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

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

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

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

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

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

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

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

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

crypto/asn1/a_digest.c:81:9: Taking false branch
79.   
80.       i = i2d(data, NULL);
81.       if ((str = OPENSSL_malloc(i)) == NULL) {
              ^
82.           ASN1err(ASN1_F_ASN1_DIGEST, ERR_R_MALLOC_FAILURE);
83.           return (0);

crypto/asn1/a_digest.c:85:5: 
83.           return (0);
84.       }
85. >     p = str;
86.       i2d(data, &p);
87.   

crypto/asn1/a_digest.c:86:5: Skipping __function_pointer__(): unresolved function pointer
84.       }
85.       p = str;
86.       i2d(data, &p);
          ^
87.   
88.       if (!EVP_Digest(str, i, md, len, type, NULL))

crypto/asn1/a_digest.c:88:10: 
86.       i2d(data, &p);
87.   
88. >     if (!EVP_Digest(str, i, md, len, type, NULL))
89.           return 0;
90.       OPENSSL_free(str);

crypto/evp/digest.c:350:1: start of procedure EVP_Digest()
  348.   }
  349.   
  350. > int EVP_Digest(const void *data, size_t count,
  351.                  unsigned char *md, unsigned int *size, const EVP_MD *type,
  352.                  ENGINE *impl)

crypto/evp/digest.c:354:5: 
  352.                  ENGINE *impl)
  353.   {
  354. >     EVP_MD_CTX *ctx = EVP_MD_CTX_new();
  355.       int ret;
  356.   

crypto/evp/digest.c:152:1: start of procedure EVP_MD_CTX_new()
    150.   }
    151.   
    152. > EVP_MD_CTX *EVP_MD_CTX_new(void)
    153.   {
    154.       return OPENSSL_zalloc(sizeof(EVP_MD_CTX));

crypto/evp/digest.c:154:5: 
    152.   EVP_MD_CTX *EVP_MD_CTX_new(void)
    153.   {
    154. >     return OPENSSL_zalloc(sizeof(EVP_MD_CTX));
    155.   }
    156.   

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

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

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

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

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

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

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

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

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

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

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

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

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

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

crypto/evp/digest.c:155:1: return from a call to EVP_MD_CTX_new
    153.   {
    154.       return OPENSSL_zalloc(sizeof(EVP_MD_CTX));
    155. > }
    156.   
    157.   void EVP_MD_CTX_free(EVP_MD_CTX *ctx)

crypto/evp/digest.c:357:9: Taking true branch
  355.       int ret;
  356.   
  357.       if (ctx == NULL)
                 ^
  358.           return 0;
  359.       EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_ONESHOT);

crypto/evp/digest.c:358:9: 
  356.   
  357.       if (ctx == NULL)
  358. >         return 0;
  359.       EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_ONESHOT);
  360.       ret = EVP_DigestInit_ex(ctx, type, impl)

crypto/evp/digest.c:366:1: return from a call to EVP_Digest
  364.   
  365.       return ret;
  366. > }
  367.   
  368.   int EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int cmd, int p1, void *p2)

crypto/asn1/a_digest.c:88:10: Taking true branch
86.       i2d(data, &p);
87.   
88.       if (!EVP_Digest(str, i, md, len, type, NULL))
               ^
89.           return 0;
90.       OPENSSL_free(str);

crypto/asn1/a_digest.c:89:9: 
87.   
88.       if (!EVP_Digest(str, i, md, len, type, NULL))
89. >         return 0;
90.       OPENSSL_free(str);
91.       return (1);
