ssl/ssl_lib.c:222: error: MEMORY_LEAK
  memory dynamically allocated by call to `CRYPTO_zalloc()` at line 220, column 13 is not reachable after line 222, column 26.
Showing all 34 steps of the trace


ssl/ssl_lib.c:211:1: start of procedure dane_ctx_enable()
209.   };
210.   
211. > static int dane_ctx_enable(struct dane_ctx_st *dctx)
212.   {
213.       const EVP_MD **mdevp;

ssl/ssl_lib.c:215:5: 
213.       const EVP_MD **mdevp;
214.       uint8_t *mdord;
215. >     uint8_t mdmax = DANETLS_MATCHING_LAST;
216.       int n = ((int) mdmax) + 1;          /* int to handle PrivMatch(255) */
217.       size_t i;

ssl/ssl_lib.c:216:5: 
214.       uint8_t *mdord;
215.       uint8_t mdmax = DANETLS_MATCHING_LAST;
216. >     int n = ((int) mdmax) + 1;          /* int to handle PrivMatch(255) */
217.       size_t i;
218.   

ssl/ssl_lib.c:219:5: 
217.       size_t i;
218.   
219. >     mdevp = OPENSSL_zalloc(n * sizeof(*mdevp));
220.       mdord = OPENSSL_zalloc(n * sizeof(*mdord));
221.   

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

crypto/mem.c:160:5: 
  158.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
  159.   {
  160. >     void *ret = CRYPTO_malloc(num, file, line);
  161.   
  162.       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 (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:123:9: Taking true branch
    121.       void *ret = NULL;
    122.   
    123.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                   ^
    124.           return malloc_impl(num, file, line);
    125.   

crypto/mem.c:123:32: Taking true branch
    121.       void *ret = NULL;
    122.   
    123.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                                          ^
    124.           return malloc_impl(num, file, line);
    125.   

crypto/mem.c:124:9: Skipping __function_pointer__(): unresolved function pointer
    122.   
    123.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
    124.           return malloc_impl(num, file, line);
                   ^
    125.   
    126.       if (num <= 0)

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

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

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

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

ssl/ssl_lib.c:220:5: 
218.   
219.       mdevp = OPENSSL_zalloc(n * sizeof(*mdevp));
220. >     mdord = OPENSSL_zalloc(n * sizeof(*mdord));
221.   
222.       if (mdord == NULL || mdevp == NULL) {

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

crypto/mem.c:160:5: 
  158.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
  159.   {
  160. >     void *ret = CRYPTO_malloc(num, file, line);
  161.   
  162.       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 (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:123:9: Taking false branch
    121.       void *ret = NULL;
    122.   
    123.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                   ^
    124.           return malloc_impl(num, file, line);
    125.   

crypto/mem.c:126:9: Taking false branch
    124.           return malloc_impl(num, file, line);
    125.   
    126.       if (num <= 0)
                   ^
    127.           return NULL;
    128.   

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

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

crypto/mem.c:139:24: 
    137.       }
    138.   #else
    139. >     osslargused(file); osslargused(line);
    140.       ret = malloc(num);
    141.   #endif

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

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

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

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

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

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

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

ssl/ssl_lib.c:222:9: Taking false branch
220.       mdord = OPENSSL_zalloc(n * sizeof(*mdord));
221.   
222.       if (mdord == NULL || mdevp == NULL) {
               ^
223.           OPENSSL_free(mdevp);
224.           SSLerr(SSL_F_DANE_CTX_ENABLE, ERR_R_MALLOC_FAILURE);

ssl/ssl_lib.c:222:26: Taking true branch
220.       mdord = OPENSSL_zalloc(n * sizeof(*mdord));
221.   
222.       if (mdord == NULL || mdevp == NULL) {
                                ^
223.           OPENSSL_free(mdevp);
224.           SSLerr(SSL_F_DANE_CTX_ENABLE, ERR_R_MALLOC_FAILURE);
