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


ssl/ssl_ciph.c:489:1: start of procedure do_load_builtin_compressions()
487.   }
488.   
489. > DEFINE_RUN_ONCE_STATIC(do_load_builtin_compressions)
490.   {
491.       SSL_COMP *comp = NULL;

ssl/ssl_ciph.c:491:5: 
489.   DEFINE_RUN_ONCE_STATIC(do_load_builtin_compressions)
490.   {
491. >     SSL_COMP *comp = NULL;
492.       COMP_METHOD *method = COMP_zlib();
493.   

ssl/ssl_ciph.c:492:5: 
490.   {
491.       SSL_COMP *comp = NULL;
492. >     COMP_METHOD *method = COMP_zlib();
493.   
494.       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:494:5: 
492.       COMP_METHOD *method = COMP_zlib();
493.   
494. >     CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
495.       ssl_comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
496.   

crypto/mem_dbg.c:117:1: start of procedure CRYPTO_mem_ctrl()
  115.   #endif
  116.   
  117. > int CRYPTO_mem_ctrl(int mode)
  118.   {
  119.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG

crypto/mem_dbg.c:120:5: 
  118.   {
  119.   #ifdef OPENSSL_NO_CRYPTO_MDEBUG
  120. >     return mode - mode;
  121.   #else
  122.       int ret = mh_mode;

crypto/mem_dbg.c:188:1: return from a call to CRYPTO_mem_ctrl
  186.       return (ret);
  187.   #endif
  188. > }
  189.   
  190.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG

ssl/ssl_ciph.c:495:5: 
493.   
494.       CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
495. >     ssl_comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
496.   
497.       if (COMP_get_type(method) != NID_undef && ssl_comp_methods != NULL) {

include/openssl/ssl.h:822:1: start of procedure sk_SSL_COMP_new()
  820.    */
  821.   DEFINE_STACK_OF_CONST(SSL_CIPHER)
  822. > DEFINE_STACK_OF(SSL_COMP)
  823.   
  824.   /* compatibility */

include/openssl/ssl.h:822:1: return from a call to sk_SSL_COMP_new
  820.    */
  821.   DEFINE_STACK_OF_CONST(SSL_CIPHER)
  822. > DEFINE_STACK_OF(SSL_COMP)
  823.   
  824.   /* compatibility */

ssl/ssl_ciph.c:497:9: 
495.       ssl_comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
496.   
497. >     if (COMP_get_type(method) != NID_undef && ssl_comp_methods != NULL) {
498.           comp = OPENSSL_malloc(sizeof(*comp));
499.           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:497:9: Taking true branch
495.       ssl_comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
496.   
497.       if (COMP_get_type(method) != NID_undef && ssl_comp_methods != NULL) {
               ^
498.           comp = OPENSSL_malloc(sizeof(*comp));
499.           if (comp != NULL) {

ssl/ssl_ciph.c:497:47: Taking true branch
495.       ssl_comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
496.   
497.       if (COMP_get_type(method) != NID_undef && ssl_comp_methods != NULL) {
                                                     ^
498.           comp = OPENSSL_malloc(sizeof(*comp));
499.           if (comp != NULL) {

ssl/ssl_ciph.c:498:9: 
496.   
497.       if (COMP_get_type(method) != NID_undef && ssl_comp_methods != NULL) {
498. >         comp = OPENSSL_malloc(sizeof(*comp));
499.           if (comp != NULL) {
500.               comp->method = method;

crypto/mem.c:71:1: start of procedure CRYPTO_malloc()
  69.   }
  70.   
  71. > void *CRYPTO_malloc(size_t num, const char *file, int line)
  72.   {
  73.       void *ret = NULL;

crypto/mem.c:73:5: 
  71.   void *CRYPTO_malloc(size_t num, const char *file, int line)
  72.   {
  73. >     void *ret = NULL;
  74.   
  75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:75:9: Taking false branch
  73.       void *ret = NULL;
  74.   
  75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                ^
  76.           return malloc_impl(num, file, line);
  77.   

crypto/mem.c:78:9: Taking false branch
  76.           return malloc_impl(num, file, line);
  77.   
  78.       if (num <= 0)
                ^
  79.           return NULL;
  80.   

crypto/mem.c:81:5: 
  79.           return NULL;
  80.   
  81. >     allow_customize = 0;
  82.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
  83.       if (call_malloc_debug) {

crypto/mem.c:91:5: 
  89.       }
  90.   #else
  91. >     osslargused(file); osslargused(line);
  92.       ret = malloc(num);
  93.   #endif

crypto/mem.c:91:24: 
  89.       }
  90.   #else
  91. >     osslargused(file); osslargused(line);
  92.       ret = malloc(num);
  93.   #endif

crypto/mem.c:92:5: 
  90.   #else
  91.       osslargused(file); osslargused(line);
  92. >     ret = malloc(num);
  93.   #endif
  94.   

crypto/mem.c:95:5: 
  93.   #endif
  94.   
  95. >     return ret;
  96.   }
  97.   

crypto/mem.c:96:1: return from a call to CRYPTO_malloc
  94.   
  95.       return ret;
  96. > }
  97.   
  98.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

ssl/ssl_ciph.c:499:13: Taking true branch
497.       if (COMP_get_type(method) != NID_undef && ssl_comp_methods != NULL) {
498.           comp = OPENSSL_malloc(sizeof(*comp));
499.           if (comp != NULL) {
                   ^
500.               comp->method = method;
501.               comp->id = SSL_COMP_ZLIB_IDX;

ssl/ssl_ciph.c:500:13: 
498.           comp = OPENSSL_malloc(sizeof(*comp));
499.           if (comp != NULL) {
500. >             comp->method = method;
501.               comp->id = SSL_COMP_ZLIB_IDX;
502.               comp->name = COMP_get_name(method);

ssl/ssl_ciph.c:501:13: 
499.           if (comp != NULL) {
500.               comp->method = method;
501. >             comp->id = SSL_COMP_ZLIB_IDX;
502.               comp->name = COMP_get_name(method);
503.               sk_SSL_COMP_push(ssl_comp_methods, comp);

ssl/ssl_ciph.c:502:13: 
500.               comp->method = method;
501.               comp->id = SSL_COMP_ZLIB_IDX;
502. >             comp->name = COMP_get_name(method);
503.               sk_SSL_COMP_push(ssl_comp_methods, comp);
504.               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:503:13: 
501.               comp->id = SSL_COMP_ZLIB_IDX;
502.               comp->name = COMP_get_name(method);
503. >             sk_SSL_COMP_push(ssl_comp_methods, comp);
504.               sk_SSL_COMP_sort(ssl_comp_methods);
505.           }

include/openssl/ssl.h:822:1: start of procedure sk_SSL_COMP_push()
  820.    */
  821.   DEFINE_STACK_OF_CONST(SSL_CIPHER)
  822. > DEFINE_STACK_OF(SSL_COMP)
  823.   
  824.   /* compatibility */

crypto/stack/stack.c:200:1: start of procedure OPENSSL_sk_push()
    198.   }
    199.   
    200. > int OPENSSL_sk_push(OPENSSL_STACK *st, const void *data)
    201.   {
    202.       return (OPENSSL_sk_insert(st, data, st->num));

crypto/stack/stack.c:202:5: Skipping OPENSSL_sk_insert(): empty list of specs
    200.   int OPENSSL_sk_push(OPENSSL_STACK *st, const void *data)
    201.   {
    202.       return (OPENSSL_sk_insert(st, data, st->num));
               ^
    203.   }
    204.   

crypto/stack/stack.c:203:1: return from a call to OPENSSL_sk_push
    201.   {
    202.       return (OPENSSL_sk_insert(st, data, st->num));
    203. > }
    204.   
    205.   int OPENSSL_sk_unshift(OPENSSL_STACK *st, const void *data)

include/openssl/ssl.h:822:1: return from a call to sk_SSL_COMP_push
  820.    */
  821.   DEFINE_STACK_OF_CONST(SSL_CIPHER)
  822. > DEFINE_STACK_OF(SSL_COMP)
  823.   
  824.   /* compatibility */
