crypto/srp/srp_vfy.c:257: error: MEMORY_LEAK
  memory dynamically allocated by call to `sk_SRP_user_pwd_new_null()` at line 255, column 26 is not reachable after line 257, column 9.
Showing all 93 steps of the trace


crypto/srp/srp_vfy.c:249:1: start of procedure SRP_VBASE_new()
247.   }
248.   
249. > SRP_VBASE *SRP_VBASE_new(char *seed_key)
250.   {
251.       SRP_VBASE *vb = OPENSSL_malloc(sizeof(*vb));

crypto/srp/srp_vfy.c:251:5: 
249.   SRP_VBASE *SRP_VBASE_new(char *seed_key)
250.   {
251. >     SRP_VBASE *vb = OPENSSL_malloc(sizeof(*vb));
252.   
253.       if (vb == 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/srp/srp_vfy.c:253:9: Taking false branch
251.       SRP_VBASE *vb = OPENSSL_malloc(sizeof(*vb));
252.   
253.       if (vb == NULL)
               ^
254.           return NULL;
255.       if ((vb->users_pwd = sk_SRP_user_pwd_new_null()) == NULL

crypto/srp/srp_vfy.c:255:9: 
253.       if (vb == NULL)
254.           return NULL;
255. >     if ((vb->users_pwd = sk_SRP_user_pwd_new_null()) == NULL
256.           || (vb->gN_cache = sk_SRP_gN_cache_new_null()) == NULL) {
257.           OPENSSL_free(vb);

include/openssl/srp.h:96:1: start of procedure sk_SRP_user_pwd_new_null()
  94.   } SRP_user_pwd;
  95.   
  96. > DEFINE_STACK_OF(SRP_user_pwd)
  97.   
  98.   typedef struct SRP_VBASE_st {

crypto/stack/stack.c:144:1: start of procedure sk_new_null()
    142.   }
    143.   
    144. > _STACK *sk_new_null(void)
    145.   {
    146.       return sk_new((int (*)(const void *, const void *))0);

crypto/stack/stack.c:146:5: 
    144.   _STACK *sk_new_null(void)
    145.   {
    146. >     return sk_new((int (*)(const void *, const void *))0);
    147.   }
    148.   

crypto/stack/stack.c:149:1: start of procedure sk_new()
      147.   }
      148.   
      149. > _STACK *sk_new(int (*c) (const void *, const void *))
      150.   {
      151.       _STACK *ret;

crypto/stack/stack.c:153:9: 
      151.       _STACK *ret;
      152.   
      153. >     if ((ret = OPENSSL_zalloc(sizeof(_STACK))) == NULL)
      154.           goto err;
      155.       if ((ret->data = OPENSSL_zalloc(sizeof(*ret->data) * MIN_NODES)) == NULL)

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 true 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:161:9: 
        159.   
        160.       if (ret != NULL)
        161. >         memset(ret, 0, num);
        162.       return ret;
        163.   }

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/stack/stack.c:153:9: Taking false branch
      151.       _STACK *ret;
      152.   
      153.       if ((ret = OPENSSL_zalloc(sizeof(_STACK))) == NULL)
                     ^
      154.           goto err;
      155.       if ((ret->data = OPENSSL_zalloc(sizeof(*ret->data) * MIN_NODES)) == NULL)

crypto/stack/stack.c:155:9: 
      153.       if ((ret = OPENSSL_zalloc(sizeof(_STACK))) == NULL)
      154.           goto err;
      155. >     if ((ret->data = OPENSSL_zalloc(sizeof(*ret->data) * MIN_NODES)) == NULL)
      156.           goto err;
      157.       ret->comp = c;

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 true 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:161:9: 
        159.   
        160.       if (ret != NULL)
        161. >         memset(ret, 0, num);
        162.       return ret;
        163.   }

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/stack/stack.c:155:9: Taking false branch
      153.       if ((ret = OPENSSL_zalloc(sizeof(_STACK))) == NULL)
      154.           goto err;
      155.       if ((ret->data = OPENSSL_zalloc(sizeof(*ret->data) * MIN_NODES)) == NULL)
                     ^
      156.           goto err;
      157.       ret->comp = c;

crypto/stack/stack.c:157:5: 
      155.       if ((ret->data = OPENSSL_zalloc(sizeof(*ret->data) * MIN_NODES)) == NULL)
      156.           goto err;
      157. >     ret->comp = c;
      158.       ret->num_alloc = MIN_NODES;
      159.       return (ret);

crypto/stack/stack.c:158:5: 
      156.           goto err;
      157.       ret->comp = c;
      158. >     ret->num_alloc = MIN_NODES;
      159.       return (ret);
      160.   

crypto/stack/stack.c:159:5: 
      157.       ret->comp = c;
      158.       ret->num_alloc = MIN_NODES;
      159. >     return (ret);
      160.   
      161.    err:

crypto/stack/stack.c:164:1: return from a call to sk_new
      162.       OPENSSL_free(ret);
      163.       return (NULL);
      164. > }
      165.   
      166.   int sk_insert(_STACK *st, void *data, int loc)

crypto/stack/stack.c:147:1: return from a call to sk_new_null
    145.   {
    146.       return sk_new((int (*)(const void *, const void *))0);
    147. > }
    148.   
    149.   _STACK *sk_new(int (*c) (const void *, const void *))

include/openssl/srp.h:96:1: return from a call to sk_SRP_user_pwd_new_null
  94.   } SRP_user_pwd;
  95.   
  96. > DEFINE_STACK_OF(SRP_user_pwd)
  97.   
  98.   typedef struct SRP_VBASE_st {

crypto/srp/srp_vfy.c:255:9: Taking false branch
253.       if (vb == NULL)
254.           return NULL;
255.       if ((vb->users_pwd = sk_SRP_user_pwd_new_null()) == NULL
               ^
256.           || (vb->gN_cache = sk_SRP_gN_cache_new_null()) == NULL) {
257.           OPENSSL_free(vb);

crypto/srp/srp_vfy.c:256:12: 
254.           return NULL;
255.       if ((vb->users_pwd = sk_SRP_user_pwd_new_null()) == NULL
256. >         || (vb->gN_cache = sk_SRP_gN_cache_new_null()) == NULL) {
257.           OPENSSL_free(vb);
258.           return NULL;

include/openssl/srp.h:85:1: start of procedure sk_SRP_gN_cache_new_null()
  83.   
  84.   
  85. > DEFINE_STACK_OF(SRP_gN_cache)
  86.   
  87.   typedef struct SRP_user_pwd_st {

crypto/stack/stack.c:144:1: start of procedure sk_new_null()
    142.   }
    143.   
    144. > _STACK *sk_new_null(void)
    145.   {
    146.       return sk_new((int (*)(const void *, const void *))0);

crypto/stack/stack.c:146:5: 
    144.   _STACK *sk_new_null(void)
    145.   {
    146. >     return sk_new((int (*)(const void *, const void *))0);
    147.   }
    148.   

crypto/stack/stack.c:149:1: start of procedure sk_new()
      147.   }
      148.   
      149. > _STACK *sk_new(int (*c) (const void *, const void *))
      150.   {
      151.       _STACK *ret;

crypto/stack/stack.c:153:9: 
      151.       _STACK *ret;
      152.   
      153. >     if ((ret = OPENSSL_zalloc(sizeof(_STACK))) == NULL)
      154.           goto err;
      155.       if ((ret->data = OPENSSL_zalloc(sizeof(*ret->data) * MIN_NODES)) == NULL)

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/stack/stack.c:153:9: Taking true branch
      151.       _STACK *ret;
      152.   
      153.       if ((ret = OPENSSL_zalloc(sizeof(_STACK))) == NULL)
                     ^
      154.           goto err;
      155.       if ((ret->data = OPENSSL_zalloc(sizeof(*ret->data) * MIN_NODES)) == NULL)

crypto/stack/stack.c:161:2: 
      159.       return (ret);
      160.   
      161. >  err:
      162.       OPENSSL_free(ret);
      163.       return (NULL);

crypto/stack/stack.c:162:5: 
      160.   
      161.    err:
      162. >     OPENSSL_free(ret);
      163.       return (NULL);
      164.   }

crypto/mem.c:233:1: start of procedure CRYPTO_free()
        231.   }
        232.   
        233. > void CRYPTO_free(void *str)
        234.   {
        235.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG

crypto/mem.c:244:5: 
        242.       }
        243.   #else
        244. >     free(str);
        245.   #endif
        246.   }

crypto/mem.c:246:1: return from a call to CRYPTO_free
        244.       free(str);
        245.   #endif
        246. > }
        247.   
        248.   void CRYPTO_clear_free(void *str, size_t num)

crypto/stack/stack.c:163:5: 
      161.    err:
      162.       OPENSSL_free(ret);
      163. >     return (NULL);
      164.   }
      165.   

crypto/stack/stack.c:164:1: return from a call to sk_new
      162.       OPENSSL_free(ret);
      163.       return (NULL);
      164. > }
      165.   
      166.   int sk_insert(_STACK *st, void *data, int loc)

crypto/stack/stack.c:147:1: return from a call to sk_new_null
    145.   {
    146.       return sk_new((int (*)(const void *, const void *))0);
    147. > }
    148.   
    149.   _STACK *sk_new(int (*c) (const void *, const void *))

include/openssl/srp.h:85:1: return from a call to sk_SRP_gN_cache_new_null
  83.   
  84.   
  85. > DEFINE_STACK_OF(SRP_gN_cache)
  86.   
  87.   typedef struct SRP_user_pwd_st {

crypto/srp/srp_vfy.c:256:12: Taking true branch
254.           return NULL;
255.       if ((vb->users_pwd = sk_SRP_user_pwd_new_null()) == NULL
256.           || (vb->gN_cache = sk_SRP_gN_cache_new_null()) == NULL) {
                  ^
257.           OPENSSL_free(vb);
258.           return NULL;

crypto/srp/srp_vfy.c:257:9: 
255.       if ((vb->users_pwd = sk_SRP_user_pwd_new_null()) == NULL
256.           || (vb->gN_cache = sk_SRP_gN_cache_new_null()) == NULL) {
257. >         OPENSSL_free(vb);
258.           return NULL;
259.       }

crypto/mem.c:233:1: start of procedure CRYPTO_free()
  231.   }
  232.   
  233. > void CRYPTO_free(void *str)
  234.   {
  235.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG

crypto/mem.c:244:5: 
  242.       }
  243.   #else
  244. >     free(str);
  245.   #endif
  246.   }

crypto/mem.c:246:1: return from a call to CRYPTO_free
  244.       free(str);
  245.   #endif
  246. > }
  247.   
  248.   void CRYPTO_clear_free(void *str, size_t num)
