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


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

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

crypto/evp/evp_pbe.c:164:9: 
162.   
163.       if (pbe_algs == NULL) {
164. >         pbe_algs = sk_EVP_PBE_CTL_new(pbe_cmp);
165.           if (pbe_algs == NULL)
166.               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:165:13: Taking false branch
163.       if (pbe_algs == NULL) {
164.           pbe_algs = sk_EVP_PBE_CTL_new(pbe_cmp);
165.           if (pbe_algs == NULL)
                   ^
166.               goto err;
167.       }

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

crypto/mem.c:169:1: start of procedure CRYPTO_malloc()
  167.   #endif
  168.   
  169. > void *CRYPTO_malloc(size_t num, const char *file, int line)
  170.   {
  171.       void *ret = NULL;

crypto/mem.c:171:5: 
  169.   void *CRYPTO_malloc(size_t num, const char *file, int line)
  170.   {
  171. >     void *ret = NULL;
  172.   
  173.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:173:9: Taking false branch
  171.       void *ret = NULL;
  172.   
  173.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                 ^
  174.           return malloc_impl(num, file, line);
  175.   

crypto/mem.c:176:9: Taking false branch
  174.           return malloc_impl(num, file, line);
  175.   
  176.       if (num == 0)
                 ^
  177.           return NULL;
  178.   

crypto/mem.c:180:5: 
  178.   
  179.       FAILTEST();
  180. >     allow_customize = 0;
  181.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
  182.       if (call_malloc_debug) {

crypto/mem.c:190:5: 
  188.       }
  189.   #else
  190. >     osslargused(file); osslargused(line);
  191.       ret = malloc(num);
  192.   #endif

crypto/mem.c:190:24: 
  188.       }
  189.   #else
  190. >     osslargused(file); osslargused(line);
  191.       ret = malloc(num);
  192.   #endif

crypto/mem.c:191:5: 
  189.   #else
  190.       osslargused(file); osslargused(line);
  191. >     ret = malloc(num);
  192.   #endif
  193.   

crypto/mem.c:194:5: 
  192.   #endif
  193.   
  194. >     return ret;
  195.   }
  196.   

crypto/mem.c:195:1: return from a call to CRYPTO_malloc
  193.   
  194.       return ret;
  195. > }
  196.   
  197.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/evp/evp_pbe.c:169:9: Taking false branch
167.       }
168.   
169.       if ((pbe_tmp = OPENSSL_malloc(sizeof(*pbe_tmp))) == NULL)
               ^
170.           goto err;
171.   

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

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

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

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

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

crypto/evp/evp_pbe.c:178:10: 
176.       pbe_tmp->keygen = keygen;
177.   
178. >     if (!sk_EVP_PBE_CTL_push(pbe_algs, pbe_tmp)) {
179.           OPENSSL_free(pbe_tmp);
180.           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:178:10: Taking false branch
176.       pbe_tmp->keygen = keygen;
177.   
178.       if (!sk_EVP_PBE_CTL_push(pbe_algs, pbe_tmp)) {
                ^
179.           OPENSSL_free(pbe_tmp);
180.           goto err;

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