crypto/objects/obj_xref.c:118: error: MEMORY_LEAK
  memory dynamically allocated by call to `CRYPTO_malloc()` at line 106, column 11 is not reachable after line 118, column 10.
Showing all 39 steps of the trace


crypto/objects/obj_xref.c:95:1: start of procedure OBJ_add_sigid()
93.   }
94.   
95. > int OBJ_add_sigid(int signid, int dig_id, int pkey_id)
96.   {
97.       nid_triple *ntr;

crypto/objects/obj_xref.c:98:9: Taking true branch
96.   {
97.       nid_triple *ntr;
98.       if (sig_app == NULL)
               ^
99.           sig_app = sk_nid_triple_new(sig_sk_cmp);
100.       if (sig_app == NULL)

crypto/objects/obj_xref.c:99:9: 
97.       nid_triple *ntr;
98.       if (sig_app == NULL)
99. >         sig_app = sk_nid_triple_new(sig_sk_cmp);
100.       if (sig_app == NULL)
101.           return 0;

crypto/objects/obj_xref.h:20:1: start of procedure sk_nid_triple_new()
  18.   } nid_triple;
  19.   
  20. > DEFINE_STACK_OF(nid_triple)
  21.   
  22.   static const nid_triple sigoid_srt[] = {

crypto/objects/obj_xref.h:20:1: return from a call to sk_nid_triple_new
  18.   } nid_triple;
  19.   
  20. > DEFINE_STACK_OF(nid_triple)
  21.   
  22.   static const nid_triple sigoid_srt[] = {

crypto/objects/obj_xref.c:100:9: Taking false branch
98.       if (sig_app == NULL)
99.           sig_app = sk_nid_triple_new(sig_sk_cmp);
100.       if (sig_app == NULL)
               ^
101.           return 0;
102.       if (sigx_app == NULL)

crypto/objects/obj_xref.c:102:9: Taking true branch
100.       if (sig_app == NULL)
101.           return 0;
102.       if (sigx_app == NULL)
               ^
103.           sigx_app = sk_nid_triple_new(sigx_cmp);
104.       if (sigx_app == NULL)

crypto/objects/obj_xref.c:103:9: 
101.           return 0;
102.       if (sigx_app == NULL)
103. >         sigx_app = sk_nid_triple_new(sigx_cmp);
104.       if (sigx_app == NULL)
105.           return 0;

crypto/objects/obj_xref.h:20:1: start of procedure sk_nid_triple_new()
  18.   } nid_triple;
  19.   
  20. > DEFINE_STACK_OF(nid_triple)
  21.   
  22.   static const nid_triple sigoid_srt[] = {

crypto/objects/obj_xref.h:20:1: return from a call to sk_nid_triple_new
  18.   } nid_triple;
  19.   
  20. > DEFINE_STACK_OF(nid_triple)
  21.   
  22.   static const nid_triple sigoid_srt[] = {

crypto/objects/obj_xref.c:104:9: Taking false branch
102.       if (sigx_app == NULL)
103.           sigx_app = sk_nid_triple_new(sigx_cmp);
104.       if (sigx_app == NULL)
               ^
105.           return 0;
106.       ntr = OPENSSL_malloc(sizeof(*ntr));

crypto/objects/obj_xref.c:106:5: 
104.       if (sigx_app == NULL)
105.           return 0;
106. >     ntr = OPENSSL_malloc(sizeof(*ntr));
107.       if (ntr == NULL)
108.           return 0;

crypto/mem.c:157:1: start of procedure CRYPTO_malloc()
  155.   #endif
  156.   
  157. > void *CRYPTO_malloc(size_t num, const char *file, int line)
  158.   {
  159.       void *ret = NULL;

crypto/mem.c:159:5: 
  157.   void *CRYPTO_malloc(size_t num, const char *file, int line)
  158.   {
  159. >     void *ret = NULL;
  160.   
  161.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:161:9: Taking false branch
  159.       void *ret = NULL;
  160.   
  161.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                 ^
  162.           return malloc_impl(num, file, line);
  163.   

crypto/mem.c:164:9: Taking false branch
  162.           return malloc_impl(num, file, line);
  163.   
  164.       if (num <= 0)
                 ^
  165.           return NULL;
  166.   

crypto/mem.c:168:5: 
  166.   
  167.       FAILTEST();
  168. >     allow_customize = 0;
  169.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
  170.       if (call_malloc_debug) {

crypto/mem.c:178:5: 
  176.       }
  177.   #else
  178. >     osslargused(file); osslargused(line);
  179.       ret = malloc(num);
  180.   #endif

crypto/mem.c:178:24: 
  176.       }
  177.   #else
  178. >     osslargused(file); osslargused(line);
  179.       ret = malloc(num);
  180.   #endif

crypto/mem.c:179:5: 
  177.   #else
  178.       osslargused(file); osslargused(line);
  179. >     ret = malloc(num);
  180.   #endif
  181.   

crypto/mem.c:182:5: 
  180.   #endif
  181.   
  182. >     return ret;
  183.   }
  184.   

crypto/mem.c:183:1: return from a call to CRYPTO_malloc
  181.   
  182.       return ret;
  183. > }
  184.   
  185.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/objects/obj_xref.c:107:9: Taking false branch
105.           return 0;
106.       ntr = OPENSSL_malloc(sizeof(*ntr));
107.       if (ntr == NULL)
               ^
108.           return 0;
109.       ntr->sign_id = signid;

crypto/objects/obj_xref.c:109:5: 
107.       if (ntr == NULL)
108.           return 0;
109. >     ntr->sign_id = signid;
110.       ntr->hash_id = dig_id;
111.       ntr->pkey_id = pkey_id;

crypto/objects/obj_xref.c:110:5: 
108.           return 0;
109.       ntr->sign_id = signid;
110. >     ntr->hash_id = dig_id;
111.       ntr->pkey_id = pkey_id;
112.   

crypto/objects/obj_xref.c:111:5: 
109.       ntr->sign_id = signid;
110.       ntr->hash_id = dig_id;
111. >     ntr->pkey_id = pkey_id;
112.   
113.       if (!sk_nid_triple_push(sig_app, ntr)) {

crypto/objects/obj_xref.c:113:10: 
111.       ntr->pkey_id = pkey_id;
112.   
113. >     if (!sk_nid_triple_push(sig_app, ntr)) {
114.           OPENSSL_free(ntr);
115.           return 0;

crypto/objects/obj_xref.h:20:1: start of procedure sk_nid_triple_push()
  18.   } nid_triple;
  19.   
  20. > DEFINE_STACK_OF(nid_triple)
  21.   
  22.   static const nid_triple sigoid_srt[] = {

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/objects/obj_xref.h:20:1: return from a call to sk_nid_triple_push
  18.   } nid_triple;
  19.   
  20. > DEFINE_STACK_OF(nid_triple)
  21.   
  22.   static const nid_triple sigoid_srt[] = {

crypto/objects/obj_xref.c:113:10: Taking false branch
111.       ntr->pkey_id = pkey_id;
112.   
113.       if (!sk_nid_triple_push(sig_app, ntr)) {
                ^
114.           OPENSSL_free(ntr);
115.           return 0;

crypto/objects/obj_xref.c:118:10: 
116.       }
117.   
118. >     if (!sk_nid_triple_push(sigx_app, ntr))
119.           return 0;
120.   

crypto/objects/obj_xref.h:20:1: start of procedure sk_nid_triple_push()
  18.   } nid_triple;
  19.   
  20. > DEFINE_STACK_OF(nid_triple)
  21.   
  22.   static const nid_triple sigoid_srt[] = {

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/objects/obj_xref.h:20:1: return from a call to sk_nid_triple_push
  18.   } nid_triple;
  19.   
  20. > DEFINE_STACK_OF(nid_triple)
  21.   
  22.   static const nid_triple sigoid_srt[] = {
