crypto/evp/evp_pbe.c:225: error: MEMORY_LEAK
  memory dynamically allocated by call to `CRYPTO_malloc()` at line 216, column 20 is not reachable after line 225, column 5.
Showing all 40 steps of the trace


crypto/evp/evp_pbe.c:205:1: start of procedure EVP_PBE_alg_add_type()
203.   /* Add a PBE algorithm */
204.   
205. > int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid,
206.                            int md_nid, EVP_PBE_KEYGEN *keygen)
207.   {

crypto/evp/evp_pbe.c:210:9: Taking false branch
208.       EVP_PBE_CTL *pbe_tmp;
209.   
210.       if (pbe_algs == NULL) {
               ^
211.           pbe_algs = sk_EVP_PBE_CTL_new(pbe_cmp);
212.           if (pbe_algs == NULL)

crypto/evp/evp_pbe.c:216:9: 
214.       }
215.   
216. >     if ((pbe_tmp = OPENSSL_malloc(sizeof(*pbe_tmp))) == NULL)
217.           goto err;
218.   

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/evp/evp_pbe.c:216:9: Taking false branch
214.       }
215.   
216.       if ((pbe_tmp = OPENSSL_malloc(sizeof(*pbe_tmp))) == NULL)
               ^
217.           goto err;
218.   

crypto/evp/evp_pbe.c:219:5: 
217.           goto err;
218.   
219. >     pbe_tmp->pbe_type = pbe_type;
220.       pbe_tmp->pbe_nid = pbe_nid;
221.       pbe_tmp->cipher_nid = cipher_nid;

crypto/evp/evp_pbe.c:220:5: 
218.   
219.       pbe_tmp->pbe_type = pbe_type;
220. >     pbe_tmp->pbe_nid = pbe_nid;
221.       pbe_tmp->cipher_nid = cipher_nid;
222.       pbe_tmp->md_nid = md_nid;

crypto/evp/evp_pbe.c:221:5: 
219.       pbe_tmp->pbe_type = pbe_type;
220.       pbe_tmp->pbe_nid = pbe_nid;
221. >     pbe_tmp->cipher_nid = cipher_nid;
222.       pbe_tmp->md_nid = md_nid;
223.       pbe_tmp->keygen = keygen;

crypto/evp/evp_pbe.c:222:5: 
220.       pbe_tmp->pbe_nid = pbe_nid;
221.       pbe_tmp->cipher_nid = cipher_nid;
222. >     pbe_tmp->md_nid = md_nid;
223.       pbe_tmp->keygen = keygen;
224.   

crypto/evp/evp_pbe.c:223:5: 
221.       pbe_tmp->cipher_nid = cipher_nid;
222.       pbe_tmp->md_nid = md_nid;
223. >     pbe_tmp->keygen = keygen;
224.   
225.       sk_EVP_PBE_CTL_push(pbe_algs, pbe_tmp);

crypto/evp/evp_pbe.c:225:5: 
223.       pbe_tmp->keygen = keygen;
224.   
225. >     sk_EVP_PBE_CTL_push(pbe_algs, pbe_tmp);
226.       return 1;
227.   

crypto/evp/evp_locl.h:115:1: start of procedure sk_EVP_PBE_CTL_push()
  113.   
  114.   typedef struct evp_pbe_st EVP_PBE_CTL;
  115. > DEFINE_STACK_OF(EVP_PBE_CTL)

crypto/stack/stack.c:258:1: start of procedure sk_push()
    256.   }
    257.   
    258. > int sk_push(_STACK *st, void *data)
    259.   {
    260.       return (sk_insert(st, data, st->num));

crypto/stack/stack.c:260:5: 
    258.   int sk_push(_STACK *st, void *data)
    259.   {
    260. >     return (sk_insert(st, data, st->num));
    261.   }
    262.   

crypto/stack/stack.c:166:1: start of procedure sk_insert()
      164.   }
      165.   
      166. > int sk_insert(_STACK *st, void *data, int loc)
      167.   {
      168.       char **s;

crypto/stack/stack.c:170:9: Taking false branch
      168.       char **s;
      169.   
      170.       if (st == NULL)
                     ^
      171.           return 0;
      172.       if (st->num_alloc <= st->num + 1) {

crypto/stack/stack.c:172:9: Taking true branch
      170.       if (st == NULL)
      171.           return 0;
      172.       if (st->num_alloc <= st->num + 1) {
                     ^
      173.           s = OPENSSL_realloc((char *)st->data,
      174.                               (unsigned int)sizeof(char *) * st->num_alloc * 2);

crypto/stack/stack.c:173:9: 
      171.           return 0;
      172.       if (st->num_alloc <= st->num + 1) {
      173. >         s = OPENSSL_realloc((char *)st->data,
      174.                               (unsigned int)sizeof(char *) * st->num_alloc * 2);
      175.           if (s == NULL)

crypto/mem.c:165:1: start of procedure CRYPTO_realloc()
        163.   }
        164.   
        165. > void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)
        166.   {
        167.       if (str == NULL)

crypto/mem.c:167:9: Taking true branch
        165.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)
        166.   {
        167.       if (str == NULL)
                       ^
        168.           return CRYPTO_malloc(num, file, line);
        169.   

crypto/mem.c:168:9: 
        166.   {
        167.       if (str == NULL)
        168. >         return CRYPTO_malloc(num, file, line);
        169.   
        170.       if (num == 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 true branch
          121.       void *ret = NULL;
          122.   
          123.       if (num <= 0)
                         ^
          124.           return NULL;
          125.   

crypto/mem.c:124:9: 
          122.   
          123.       if (num <= 0)
          124. >         return NULL;
          125.   
          126.       allow_customize = 0;

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:190:1: return from a call to CRYPTO_realloc
        188.       return realloc(str, num);
        189.   
        190. > }
        191.   
        192.   void *CRYPTO_clear_realloc(void *str, size_t old_len, size_t num,

crypto/stack/stack.c:175:13: Taking true branch
      173.           s = OPENSSL_realloc((char *)st->data,
      174.                               (unsigned int)sizeof(char *) * st->num_alloc * 2);
      175.           if (s == NULL)
                         ^
      176.               return (0);
      177.           st->data = s;

crypto/stack/stack.c:176:13: 
      174.                               (unsigned int)sizeof(char *) * st->num_alloc * 2);
      175.           if (s == NULL)
      176. >             return (0);
      177.           st->data = s;
      178.           st->num_alloc *= 2;

crypto/stack/stack.c:190:1: return from a call to sk_insert
      188.       st->sorted = 0;
      189.       return (st->num);
      190. > }
      191.   
      192.   void *sk_delete_ptr(_STACK *st, void *p)

crypto/stack/stack.c:261:1: return from a call to sk_push
    259.   {
    260.       return (sk_insert(st, data, st->num));
    261. > }
    262.   
    263.   int sk_unshift(_STACK *st, void *data)

crypto/evp/evp_locl.h:115:1: return from a call to sk_EVP_PBE_CTL_push
  113.   
  114.   typedef struct evp_pbe_st EVP_PBE_CTL;
  115. > DEFINE_STACK_OF(EVP_PBE_CTL)
