ssl/ssl_ciph.c:470: error: MEMORY_LEAK
  memory dynamically allocated by call to `CRYPTO_malloc()` at line 465, column 16 is not reachable after line 470, column 13.
Showing all 55 steps of the trace


ssl/ssl_ciph.c:456:1: start of procedure do_load_builtin_compressions()
454.   }
455.   
456. > DEFINE_RUN_ONCE_STATIC(do_load_builtin_compressions)
457.   {
458.       SSL_COMP *comp = NULL;

ssl/ssl_ciph.c:458:5: 
456.   DEFINE_RUN_ONCE_STATIC(do_load_builtin_compressions)
457.   {
458. >     SSL_COMP *comp = NULL;
459.       COMP_METHOD *method = COMP_zlib();
460.   

ssl/ssl_ciph.c:459:5: 
457.   {
458.       SSL_COMP *comp = NULL;
459. >     COMP_METHOD *method = COMP_zlib();
460.   
461.       CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);

crypto/comp/c_zlib.c:209:1: start of procedure COMP_zlib()
  207.   #endif
  208.   
  209. > COMP_METHOD *COMP_zlib(void)
  210.   {
  211.       COMP_METHOD *meth = &zlib_method_nozlib;

crypto/comp/c_zlib.c:211:5: 
  209.   COMP_METHOD *COMP_zlib(void)
  210.   {
  211. >     COMP_METHOD *meth = &zlib_method_nozlib;
  212.   
  213.   #ifdef ZLIB_SHARED

crypto/comp/c_zlib.c:259:5: 
  257.   #endif
  258.   
  259. >     return meth;
  260.   }
  261.   

crypto/comp/c_zlib.c:260:1: return from a call to COMP_zlib
  258.   
  259.       return meth;
  260. > }
  261.   
  262.   void comp_zlib_cleanup_int(void)

ssl/ssl_ciph.c:461:5: 
459.       COMP_METHOD *method = COMP_zlib();
460.   
461. >     CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
462.       ssl_comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
463.   

crypto/mem_dbg.c:120:1: start of procedure CRYPTO_mem_ctrl()
  118.   #endif
  119.   
  120. > int CRYPTO_mem_ctrl(int mode)
  121.   {
  122.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG

crypto/mem_dbg.c:123:5: 
  121.   {
  122.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG
  123. >     return mode - mode;
  124.   #else
  125.       int ret = mh_mode;

crypto/mem_dbg.c:191:1: return from a call to CRYPTO_mem_ctrl
  189.       return ret;
  190.   #endif
  191. > }
  192.   
  193.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG

ssl/ssl_ciph.c:462:5: 
460.   
461.       CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
462. >     ssl_comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
463.   
464.       if (COMP_get_type(method) != NID_undef && ssl_comp_methods != NULL) {

include/openssl/ssl.h:939:1: start of procedure sk_SSL_COMP_new()
  937.    */
  938.   DEFINE_STACK_OF_CONST(SSL_CIPHER)
  939. > DEFINE_STACK_OF(SSL_COMP)
  940.   
  941.   /* compatibility */

crypto/stack/stack.c:117:1: start of procedure OPENSSL_sk_new()
    115.   }
    116.   
    117. > OPENSSL_STACK *OPENSSL_sk_new(OPENSSL_sk_compfunc c)
    118.   {
    119.       return OPENSSL_sk_new_reserve(c, 0);

crypto/stack/stack.c:119:5: Skipping OPENSSL_sk_new_reserve(): empty list of specs
    117.   OPENSSL_STACK *OPENSSL_sk_new(OPENSSL_sk_compfunc c)
    118.   {
    119.       return OPENSSL_sk_new_reserve(c, 0);
               ^
    120.   }
    121.   

crypto/stack/stack.c:120:1: return from a call to OPENSSL_sk_new
    118.   {
    119.       return OPENSSL_sk_new_reserve(c, 0);
    120. > }
    121.   
    122.   /*

include/openssl/ssl.h:939:1: return from a call to sk_SSL_COMP_new
  937.    */
  938.   DEFINE_STACK_OF_CONST(SSL_CIPHER)
  939. > DEFINE_STACK_OF(SSL_COMP)
  940.   
  941.   /* compatibility */

ssl/ssl_ciph.c:464:9: 
462.       ssl_comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
463.   
464. >     if (COMP_get_type(method) != NID_undef && ssl_comp_methods != NULL) {
465.           comp = OPENSSL_malloc(sizeof(*comp));
466.           if (comp != NULL) {

crypto/comp/comp_lib.c:36:1: start of procedure COMP_get_type()
  34.   }
  35.   
  36. > int COMP_get_type(const COMP_METHOD *meth)
  37.   {
  38.       return meth->type;

crypto/comp/comp_lib.c:38:5: 
  36.   int COMP_get_type(const COMP_METHOD *meth)
  37.   {
  38. >     return meth->type;
  39.   }
  40.   

crypto/comp/comp_lib.c:39:1: return from a call to COMP_get_type
  37.   {
  38.       return meth->type;
  39. > }
  40.   
  41.   const char *COMP_get_name(const COMP_METHOD *meth)

ssl/ssl_ciph.c:464:9: Taking true branch
462.       ssl_comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
463.   
464.       if (COMP_get_type(method) != NID_undef && ssl_comp_methods != NULL) {
               ^
465.           comp = OPENSSL_malloc(sizeof(*comp));
466.           if (comp != NULL) {

ssl/ssl_ciph.c:464:47: Taking true branch
462.       ssl_comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
463.   
464.       if (COMP_get_type(method) != NID_undef && ssl_comp_methods != NULL) {
                                                     ^
465.           comp = OPENSSL_malloc(sizeof(*comp));
466.           if (comp != NULL) {

ssl/ssl_ciph.c:465:9: 
463.   
464.       if (COMP_get_type(method) != NID_undef && ssl_comp_methods != NULL) {
465. >         comp = OPENSSL_malloc(sizeof(*comp));
466.           if (comp != NULL) {
467.               comp->method = method;

crypto/mem.c:192:1: start of procedure CRYPTO_malloc()
  190.   #endif
  191.   
  192. > void *CRYPTO_malloc(size_t num, const char *file, int line)
  193.   {
  194.       void *ret = NULL;

crypto/mem.c:194:5: 
  192.   void *CRYPTO_malloc(size_t num, const char *file, int line)
  193.   {
  194. >     void *ret = NULL;
  195.   
  196.       INCREMENT(malloc_count);

crypto/mem.c:197:9: Taking false branch
  195.   
  196.       INCREMENT(malloc_count);
  197.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                 ^
  198.           return malloc_impl(num, file, line);
  199.   

crypto/mem.c:200:9: Taking false branch
  198.           return malloc_impl(num, file, line);
  199.   
  200.       if (num == 0)
                 ^
  201.           return NULL;
  202.   

crypto/mem.c:204:9: Taking true branch
  202.   
  203.       FAILTEST();
  204.       if (allow_customize) {
                 ^
  205.           /*
  206.            * Disallow customization after the first allocation. We only set this

crypto/mem.c:210:9: 
  208.            * allocation.
  209.            */
  210. >         allow_customize = 0;
  211.       }
  212.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG

crypto/mem.c:221:5: 
  219.       }
  220.   #else
  221. >     (void)(file); (void)(line);
  222.       ret = malloc(num);
  223.   #endif

crypto/mem.c:221:19: 
  219.       }
  220.   #else
  221. >     (void)(file); (void)(line);
  222.       ret = malloc(num);
  223.   #endif

crypto/mem.c:222:5: 
  220.   #else
  221.       (void)(file); (void)(line);
  222. >     ret = malloc(num);
  223.   #endif
  224.   

crypto/mem.c:225:5: 
  223.   #endif
  224.   
  225. >     return ret;
  226.   }
  227.   

crypto/mem.c:226:1: return from a call to CRYPTO_malloc
  224.   
  225.       return ret;
  226. > }
  227.   
  228.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

ssl/ssl_ciph.c:466:13: Taking true branch
464.       if (COMP_get_type(method) != NID_undef && ssl_comp_methods != NULL) {
465.           comp = OPENSSL_malloc(sizeof(*comp));
466.           if (comp != NULL) {
                   ^
467.               comp->method = method;
468.               comp->id = SSL_COMP_ZLIB_IDX;

ssl/ssl_ciph.c:467:13: 
465.           comp = OPENSSL_malloc(sizeof(*comp));
466.           if (comp != NULL) {
467. >             comp->method = method;
468.               comp->id = SSL_COMP_ZLIB_IDX;
469.               comp->name = COMP_get_name(method);

ssl/ssl_ciph.c:468:13: 
466.           if (comp != NULL) {
467.               comp->method = method;
468. >             comp->id = SSL_COMP_ZLIB_IDX;
469.               comp->name = COMP_get_name(method);
470.               sk_SSL_COMP_push(ssl_comp_methods, comp);

ssl/ssl_ciph.c:469:13: 
467.               comp->method = method;
468.               comp->id = SSL_COMP_ZLIB_IDX;
469. >             comp->name = COMP_get_name(method);
470.               sk_SSL_COMP_push(ssl_comp_methods, comp);
471.               sk_SSL_COMP_sort(ssl_comp_methods);

crypto/comp/comp_lib.c:41:1: start of procedure COMP_get_name()
  39.   }
  40.   
  41. > const char *COMP_get_name(const COMP_METHOD *meth)
  42.   {
  43.       return meth->name;

crypto/comp/comp_lib.c:43:5: 
  41.   const char *COMP_get_name(const COMP_METHOD *meth)
  42.   {
  43. >     return meth->name;
  44.   }
  45.   

crypto/comp/comp_lib.c:44:1: return from a call to COMP_get_name
  42.   {
  43.       return meth->name;
  44. > }
  45.   
  46.   void COMP_CTX_free(COMP_CTX *ctx)

ssl/ssl_ciph.c:470:13: 
468.               comp->id = SSL_COMP_ZLIB_IDX;
469.               comp->name = COMP_get_name(method);
470. >             sk_SSL_COMP_push(ssl_comp_methods, comp);
471.               sk_SSL_COMP_sort(ssl_comp_methods);
472.           }

include/openssl/ssl.h:939:1: start of procedure sk_SSL_COMP_push()
  937.    */
  938.   DEFINE_STACK_OF_CONST(SSL_CIPHER)
  939. > DEFINE_STACK_OF(SSL_COMP)
  940.   
  941.   /* compatibility */

crypto/stack/stack.c:322:1: start of procedure OPENSSL_sk_push()
    320.   }
    321.   
    322. > int OPENSSL_sk_push(OPENSSL_STACK *st, const void *data)
    323.   {
    324.       if (st == NULL)

crypto/stack/stack.c:324:9: Taking false branch
    322.   int OPENSSL_sk_push(OPENSSL_STACK *st, const void *data)
    323.   {
    324.       if (st == NULL)
                   ^
    325.           return -1;
    326.       return OPENSSL_sk_insert(st, data, st->num);

crypto/stack/stack.c:326:5: 
    324.       if (st == NULL)
    325.           return -1;
    326. >     return OPENSSL_sk_insert(st, data, st->num);
    327.   }
    328.   

crypto/stack/stack.c:233:1: start of procedure OPENSSL_sk_insert()
      231.   }
      232.   
      233. > int OPENSSL_sk_insert(OPENSSL_STACK *st, const void *data, int loc)
      234.   {
      235.       if (st == NULL || st->num == max_nodes)

crypto/stack/stack.c:235:9: Taking false branch
      233.   int OPENSSL_sk_insert(OPENSSL_STACK *st, const void *data, int loc)
      234.   {
      235.       if (st == NULL || st->num == max_nodes)
                     ^
      236.           return 0;
      237.   

crypto/stack/stack.c:235:23: Taking false branch
      233.   int OPENSSL_sk_insert(OPENSSL_STACK *st, const void *data, int loc)
      234.   {
      235.       if (st == NULL || st->num == max_nodes)
                                   ^
      236.           return 0;
      237.   

crypto/stack/stack.c:238:10: Taking true branch
      236.           return 0;
      237.   
      238.       if (!sk_reserve(st, 1, 0))
                      ^
      239.           return 0;
      240.   

crypto/stack/stack.c:239:9: 
      237.   
      238.       if (!sk_reserve(st, 1, 0))
      239. >         return 0;
      240.   
      241.       if ((loc >= st->num) || (loc < 0)) {

crypto/stack/stack.c:251:1: return from a call to OPENSSL_sk_insert
      249.       st->sorted = 0;
      250.       return st->num;
      251. > }
      252.   
      253.   static ossl_inline void *internal_delete(OPENSSL_STACK *st, int loc)

crypto/stack/stack.c:327:1: return from a call to OPENSSL_sk_push
    325.           return -1;
    326.       return OPENSSL_sk_insert(st, data, st->num);
    327. > }
    328.   
    329.   int OPENSSL_sk_unshift(OPENSSL_STACK *st, const void *data)

include/openssl/ssl.h:939:1: return from a call to sk_SSL_COMP_push
  937.    */
  938.   DEFINE_STACK_OF_CONST(SSL_CIPHER)
  939. > DEFINE_STACK_OF(SSL_COMP)
  940.   
  941.   /* compatibility */
