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


ssl/ssl_ciph.c:446:1: start of procedure do_load_builtin_compressions()
444.   }
445.   
446. > DEFINE_RUN_ONCE_STATIC(do_load_builtin_compressions)
447.   {
448.       SSL_COMP *comp = NULL;

ssl/ssl_ciph.c:448:5: 
446.   DEFINE_RUN_ONCE_STATIC(do_load_builtin_compressions)
447.   {
448. >     SSL_COMP *comp = NULL;
449.       COMP_METHOD *method = COMP_zlib();
450.   

ssl/ssl_ciph.c:449:5: 
447.   {
448.       SSL_COMP *comp = NULL;
449. >     COMP_METHOD *method = COMP_zlib();
450.   
451.       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:451:5: 
449.       COMP_METHOD *method = COMP_zlib();
450.   
451. >     CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
452.       ssl_comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
453.   

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:452:5: 
450.   
451.       CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE);
452. >     ssl_comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
453.   
454.       if (COMP_get_type(method) != NID_undef && ssl_comp_methods != NULL) {

include/openssl/ssl.h:900:1: start of procedure sk_SSL_COMP_new()
  898.    */
  899.   DEFINE_STACK_OF_CONST(SSL_CIPHER)
  900. > DEFINE_STACK_OF(SSL_COMP)
  901.   
  902.   /* compatibility */

include/openssl/ssl.h:900:1: return from a call to sk_SSL_COMP_new
  898.    */
  899.   DEFINE_STACK_OF_CONST(SSL_CIPHER)
  900. > DEFINE_STACK_OF(SSL_COMP)
  901.   
  902.   /* compatibility */

ssl/ssl_ciph.c:454:9: 
452.       ssl_comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
453.   
454. >     if (COMP_get_type(method) != NID_undef && ssl_comp_methods != NULL) {
455.           comp = OPENSSL_malloc(sizeof(*comp));
456.           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:454:9: Taking true branch
452.       ssl_comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
453.   
454.       if (COMP_get_type(method) != NID_undef && ssl_comp_methods != NULL) {
               ^
455.           comp = OPENSSL_malloc(sizeof(*comp));
456.           if (comp != NULL) {

ssl/ssl_ciph.c:454:47: Taking true branch
452.       ssl_comp_methods = sk_SSL_COMP_new(sk_comp_cmp);
453.   
454.       if (COMP_get_type(method) != NID_undef && ssl_comp_methods != NULL) {
                                                     ^
455.           comp = OPENSSL_malloc(sizeof(*comp));
456.           if (comp != NULL) {

ssl/ssl_ciph.c:455:9: 
453.   
454.       if (COMP_get_type(method) != NID_undef && ssl_comp_methods != NULL) {
455. >         comp = OPENSSL_malloc(sizeof(*comp));
456.           if (comp != NULL) {
457.               comp->method = method;

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

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

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

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

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

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

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

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

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

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

ssl/ssl_ciph.c:456:13: Taking true branch
454.       if (COMP_get_type(method) != NID_undef && ssl_comp_methods != NULL) {
455.           comp = OPENSSL_malloc(sizeof(*comp));
456.           if (comp != NULL) {
                   ^
457.               comp->method = method;
458.               comp->id = SSL_COMP_ZLIB_IDX;

ssl/ssl_ciph.c:457:13: 
455.           comp = OPENSSL_malloc(sizeof(*comp));
456.           if (comp != NULL) {
457. >             comp->method = method;
458.               comp->id = SSL_COMP_ZLIB_IDX;
459.               comp->name = COMP_get_name(method);

ssl/ssl_ciph.c:458:13: 
456.           if (comp != NULL) {
457.               comp->method = method;
458. >             comp->id = SSL_COMP_ZLIB_IDX;
459.               comp->name = COMP_get_name(method);
460.               sk_SSL_COMP_push(ssl_comp_methods, comp);

ssl/ssl_ciph.c:459:13: 
457.               comp->method = method;
458.               comp->id = SSL_COMP_ZLIB_IDX;
459. >             comp->name = COMP_get_name(method);
460.               sk_SSL_COMP_push(ssl_comp_methods, comp);
461.               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:460:13: 
458.               comp->id = SSL_COMP_ZLIB_IDX;
459.               comp->name = COMP_get_name(method);
460. >             sk_SSL_COMP_push(ssl_comp_methods, comp);
461.               sk_SSL_COMP_sort(ssl_comp_methods);
462.           }

include/openssl/ssl.h:900:1: start of procedure sk_SSL_COMP_push()
  898.    */
  899.   DEFINE_STACK_OF_CONST(SSL_CIPHER)
  900. > DEFINE_STACK_OF(SSL_COMP)
  901.   
  902.   /* compatibility */

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)

include/openssl/ssl.h:900:1: return from a call to sk_SSL_COMP_push
  898.    */
  899.   DEFINE_STACK_OF_CONST(SSL_CIPHER)
  900. > DEFINE_STACK_OF(SSL_COMP)
  901.   
  902.   /* compatibility */
