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


crypto/evp/evp_pbe.c:156:1: start of procedure EVP_PBE_alg_add_type()
154.   /* Add a PBE algorithm */
155.   
156. > int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid,
157.                            int md_nid, EVP_PBE_KEYGEN *keygen)
158.   {

crypto/evp/evp_pbe.c:161:9: Taking true branch
159.       EVP_PBE_CTL *pbe_tmp;
160.   
161.       if (pbe_algs == NULL) {
               ^
162.           pbe_algs = sk_EVP_PBE_CTL_new(pbe_cmp);
163.           if (pbe_algs == NULL)

crypto/evp/evp_pbe.c:162:9: 
160.   
161.       if (pbe_algs == NULL) {
162. >         pbe_algs = sk_EVP_PBE_CTL_new(pbe_cmp);
163.           if (pbe_algs == NULL)
164.               goto err;

crypto/evp/evp_locl.h:66:1: start of procedure sk_EVP_PBE_CTL_new()
  64.   
  65.   typedef struct evp_pbe_st EVP_PBE_CTL;
  66. > DEFINE_STACK_OF(EVP_PBE_CTL)
  67.   
  68.   int is_partially_overlapping(const void *ptr1, const void *ptr2, int len);

crypto/evp/evp_locl.h:66:1: return from a call to sk_EVP_PBE_CTL_new
  64.   
  65.   typedef struct evp_pbe_st EVP_PBE_CTL;
  66. > DEFINE_STACK_OF(EVP_PBE_CTL)
  67.   
  68.   int is_partially_overlapping(const void *ptr1, const void *ptr2, int len);

crypto/evp/evp_pbe.c:163:13: Taking false branch
161.       if (pbe_algs == NULL) {
162.           pbe_algs = sk_EVP_PBE_CTL_new(pbe_cmp);
163.           if (pbe_algs == NULL)
                   ^
164.               goto err;
165.       }

crypto/evp/evp_pbe.c:167:9: 
165.       }
166.   
167. >     if ((pbe_tmp = OPENSSL_malloc(sizeof(*pbe_tmp))) == NULL)
168.           goto err;
169.   

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/evp/evp_pbe.c:167:9: Taking false branch
165.       }
166.   
167.       if ((pbe_tmp = OPENSSL_malloc(sizeof(*pbe_tmp))) == NULL)
               ^
168.           goto err;
169.   

crypto/evp/evp_pbe.c:170:5: 
168.           goto err;
169.   
170. >     pbe_tmp->pbe_type = pbe_type;
171.       pbe_tmp->pbe_nid = pbe_nid;
172.       pbe_tmp->cipher_nid = cipher_nid;

crypto/evp/evp_pbe.c:171:5: 
169.   
170.       pbe_tmp->pbe_type = pbe_type;
171. >     pbe_tmp->pbe_nid = pbe_nid;
172.       pbe_tmp->cipher_nid = cipher_nid;
173.       pbe_tmp->md_nid = md_nid;

crypto/evp/evp_pbe.c:172:5: 
170.       pbe_tmp->pbe_type = pbe_type;
171.       pbe_tmp->pbe_nid = pbe_nid;
172. >     pbe_tmp->cipher_nid = cipher_nid;
173.       pbe_tmp->md_nid = md_nid;
174.       pbe_tmp->keygen = keygen;

crypto/evp/evp_pbe.c:173:5: 
171.       pbe_tmp->pbe_nid = pbe_nid;
172.       pbe_tmp->cipher_nid = cipher_nid;
173. >     pbe_tmp->md_nid = md_nid;
174.       pbe_tmp->keygen = keygen;
175.   

crypto/evp/evp_pbe.c:174:5: 
172.       pbe_tmp->cipher_nid = cipher_nid;
173.       pbe_tmp->md_nid = md_nid;
174. >     pbe_tmp->keygen = keygen;
175.   
176.       if (!sk_EVP_PBE_CTL_push(pbe_algs, pbe_tmp)) {

crypto/evp/evp_pbe.c:176:10: 
174.       pbe_tmp->keygen = keygen;
175.   
176. >     if (!sk_EVP_PBE_CTL_push(pbe_algs, pbe_tmp)) {
177.           OPENSSL_free(pbe_tmp);
178.           goto err;

crypto/evp/evp_locl.h:66:1: start of procedure sk_EVP_PBE_CTL_push()
  64.   
  65.   typedef struct evp_pbe_st EVP_PBE_CTL;
  66. > DEFINE_STACK_OF(EVP_PBE_CTL)
  67.   
  68.   int is_partially_overlapping(const void *ptr1, const void *ptr2, int len);

crypto/stack/stack.c:219:1: start of procedure OPENSSL_sk_push()
    217.   }
    218.   
    219. > int OPENSSL_sk_push(OPENSSL_STACK *st, const void *data)
    220.   {
    221.       return (OPENSSL_sk_insert(st, data, st->num));

crypto/stack/stack.c:221:5: Skipping OPENSSL_sk_insert(): empty list of specs
    219.   int OPENSSL_sk_push(OPENSSL_STACK *st, const void *data)
    220.   {
    221.       return (OPENSSL_sk_insert(st, data, st->num));
               ^
    222.   }
    223.   

crypto/stack/stack.c:222:1: return from a call to OPENSSL_sk_push
    220.   {
    221.       return (OPENSSL_sk_insert(st, data, st->num));
    222. > }
    223.   
    224.   int OPENSSL_sk_unshift(OPENSSL_STACK *st, const void *data)

crypto/evp/evp_locl.h:66:1: return from a call to sk_EVP_PBE_CTL_push
  64.   
  65.   typedef struct evp_pbe_st EVP_PBE_CTL;
  66. > DEFINE_STACK_OF(EVP_PBE_CTL)
  67.   
  68.   int is_partially_overlapping(const void *ptr1, const void *ptr2, int len);

crypto/evp/evp_pbe.c:176:10: Taking false branch
174.       pbe_tmp->keygen = keygen;
175.   
176.       if (!sk_EVP_PBE_CTL_push(pbe_algs, pbe_tmp)) {
                ^
177.           OPENSSL_free(pbe_tmp);
178.           goto err;

crypto/evp/evp_pbe.c:180:5: 
178.           goto err;
179.       }
180. >     return 1;
181.   
182.    err:
