apps/ts.c:930: error: MEMORY_LEAK
  memory dynamically allocated by call to `TS_VERIFY_CTX_new()` at line 887, column 20 is not reachable after line 930, column 9.
Showing all 177 steps of the trace


apps/ts.c:874:1: start of procedure create_verify_ctx()
872.   }
873.   
874. > static TS_VERIFY_CTX *create_verify_ctx(char *data, char *digest,
875.                                           char *queryfile,
876.                                           char *CApath, char *CAfile,

apps/ts.c:880:5: 
878.                                           X509_VERIFY_PARAM *vpm)
879.   {
880. >     TS_VERIFY_CTX *ctx = NULL;
881.       BIO *input = NULL;
882.       TS_REQ *request = NULL;

apps/ts.c:881:5: 
879.   {
880.       TS_VERIFY_CTX *ctx = NULL;
881. >     BIO *input = NULL;
882.       TS_REQ *request = NULL;
883.       int ret = 0;

apps/ts.c:882:5: 
880.       TS_VERIFY_CTX *ctx = NULL;
881.       BIO *input = NULL;
882. >     TS_REQ *request = NULL;
883.       int ret = 0;
884.       int f = 0;

apps/ts.c:883:5: 
881.       BIO *input = NULL;
882.       TS_REQ *request = NULL;
883. >     int ret = 0;
884.       int f = 0;
885.   

apps/ts.c:884:5: 
882.       TS_REQ *request = NULL;
883.       int ret = 0;
884. >     int f = 0;
885.   
886.       if (data != NULL || digest != NULL) {

apps/ts.c:886:9: Taking false branch
884.       int f = 0;
885.   
886.       if (data != NULL || digest != NULL) {
               ^
887.           if ((ctx = TS_VERIFY_CTX_new()) == NULL)
888.               goto err;

apps/ts.c:886:25: Taking true branch
884.       int f = 0;
885.   
886.       if (data != NULL || digest != NULL) {
                               ^
887.           if ((ctx = TS_VERIFY_CTX_new()) == NULL)
888.               goto err;

apps/ts.c:887:13: 
885.   
886.       if (data != NULL || digest != NULL) {
887. >         if ((ctx = TS_VERIFY_CTX_new()) == NULL)
888.               goto err;
889.           f = TS_VFY_VERSION | TS_VFY_SIGNER;

crypto/ts/ts_verify_ctx.c:15:1: start of procedure TS_VERIFY_CTX_new()
  13.   #include "ts_lcl.h"
  14.   
  15. > TS_VERIFY_CTX *TS_VERIFY_CTX_new(void)
  16.   {
  17.       TS_VERIFY_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));

crypto/ts/ts_verify_ctx.c:17:5: 
  15.   TS_VERIFY_CTX *TS_VERIFY_CTX_new(void)
  16.   {
  17. >     TS_VERIFY_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
  18.   
  19.       if (ctx == NULL)

crypto/mem.c:98:1: start of procedure CRYPTO_zalloc()
    96.   }
    97.   
    98. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
    99.   {
    100.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:100:5: 
    98.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
    99.   {
    100. >     void *ret = CRYPTO_malloc(num, file, line);
    101.   
    102.       if (ret != NULL)

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)

crypto/mem.c:102:9: Taking true branch
    100.       void *ret = CRYPTO_malloc(num, file, line);
    101.   
    102.       if (ret != NULL)
                   ^
    103.           memset(ret, 0, num);
    104.       return ret;

crypto/mem.c:103:9: 
    101.   
    102.       if (ret != NULL)
    103. >         memset(ret, 0, num);
    104.       return ret;
    105.   }

crypto/mem.c:104:5: 
    102.       if (ret != NULL)
    103.           memset(ret, 0, num);
    104. >     return ret;
    105.   }
    106.   

crypto/mem.c:105:1: return from a call to CRYPTO_zalloc
    103.           memset(ret, 0, num);
    104.       return ret;
    105. > }
    106.   
    107.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/ts/ts_verify_ctx.c:19:9: Taking false branch
  17.       TS_VERIFY_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
  18.   
  19.       if (ctx == NULL)
                ^
  20.           TSerr(TS_F_TS_VERIFY_CTX_NEW, ERR_R_MALLOC_FAILURE);
  21.       return ctx;

crypto/ts/ts_verify_ctx.c:21:5: 
  19.       if (ctx == NULL)
  20.           TSerr(TS_F_TS_VERIFY_CTX_NEW, ERR_R_MALLOC_FAILURE);
  21. >     return ctx;
  22.   }
  23.   

crypto/ts/ts_verify_ctx.c:22:1: return from a call to TS_VERIFY_CTX_new
  20.           TSerr(TS_F_TS_VERIFY_CTX_NEW, ERR_R_MALLOC_FAILURE);
  21.       return ctx;
  22. > }
  23.   
  24.   void TS_VERIFY_CTX_init(TS_VERIFY_CTX *ctx)

apps/ts.c:887:13: Taking false branch
885.   
886.       if (data != NULL || digest != NULL) {
887.           if ((ctx = TS_VERIFY_CTX_new()) == NULL)
                   ^
888.               goto err;
889.           f = TS_VFY_VERSION | TS_VFY_SIGNER;

apps/ts.c:889:9: 
887.           if ((ctx = TS_VERIFY_CTX_new()) == NULL)
888.               goto err;
889. >         f = TS_VFY_VERSION | TS_VFY_SIGNER;
890.           if (data != NULL) {
891.               f |= TS_VFY_DATA;

apps/ts.c:890:13: Taking false branch
888.               goto err;
889.           f = TS_VFY_VERSION | TS_VFY_SIGNER;
890.           if (data != NULL) {
                   ^
891.               f |= TS_VFY_DATA;
892.               if (TS_VERIFY_CTX_set_data(ctx, BIO_new_file(data, "rb")) == NULL)

apps/ts.c:894:20: Taking true branch
892.               if (TS_VERIFY_CTX_set_data(ctx, BIO_new_file(data, "rb")) == NULL)
893.                   goto err;
894.           } else if (digest != NULL) {
                          ^
895.               long imprint_len;
896.               unsigned char *hexstr = OPENSSL_hexstr2buf(digest, &imprint_len);

apps/ts.c:896:13: Skipping OPENSSL_hexstr2buf(): empty list of specs
894.           } else if (digest != NULL) {
895.               long imprint_len;
896.               unsigned char *hexstr = OPENSSL_hexstr2buf(digest, &imprint_len);
                   ^
897.               f |= TS_VFY_IMPRINT;
898.               if (TS_VERIFY_CTX_set_imprint(ctx, hexstr, imprint_len) == NULL) {

apps/ts.c:897:13: 
895.               long imprint_len;
896.               unsigned char *hexstr = OPENSSL_hexstr2buf(digest, &imprint_len);
897. >             f |= TS_VFY_IMPRINT;
898.               if (TS_VERIFY_CTX_set_imprint(ctx, hexstr, imprint_len) == NULL) {
899.                   BIO_printf(bio_err, "invalid digest string\n");

apps/ts.c:898:17: 
896.               unsigned char *hexstr = OPENSSL_hexstr2buf(digest, &imprint_len);
897.               f |= TS_VFY_IMPRINT;
898. >             if (TS_VERIFY_CTX_set_imprint(ctx, hexstr, imprint_len) == NULL) {
899.                   BIO_printf(bio_err, "invalid digest string\n");
900.                   goto err;

crypto/ts/ts_verify_ctx.c:70:1: start of procedure TS_VERIFY_CTX_set_imprint()
  68.   }
  69.   
  70. > unsigned char *TS_VERIFY_CTX_set_imprint(TS_VERIFY_CTX *ctx,
  71.                                            unsigned char *hexstr, long len)
  72.   {

crypto/ts/ts_verify_ctx.c:73:5: 
  71.                                            unsigned char *hexstr, long len)
  72.   {
  73. >     ctx->imprint = hexstr;
  74.       ctx->imprint_len = len;
  75.       return ctx->imprint;

crypto/ts/ts_verify_ctx.c:74:5: 
  72.   {
  73.       ctx->imprint = hexstr;
  74. >     ctx->imprint_len = len;
  75.       return ctx->imprint;
  76.   }

crypto/ts/ts_verify_ctx.c:75:5: 
  73.       ctx->imprint = hexstr;
  74.       ctx->imprint_len = len;
  75. >     return ctx->imprint;
  76.   }
  77.   

crypto/ts/ts_verify_ctx.c:76:1: return from a call to TS_VERIFY_CTX_set_imprint
  74.       ctx->imprint_len = len;
  75.       return ctx->imprint;
  76. > }
  77.   
  78.   void TS_VERIFY_CTX_cleanup(TS_VERIFY_CTX *ctx)

apps/ts.c:898:17: Taking false branch
896.               unsigned char *hexstr = OPENSSL_hexstr2buf(digest, &imprint_len);
897.               f |= TS_VFY_IMPRINT;
898.               if (TS_VERIFY_CTX_set_imprint(ctx, hexstr, imprint_len) == NULL) {
                       ^
899.                   BIO_printf(bio_err, "invalid digest string\n");
900.                   goto err;

apps/ts.c:915:5: 
913.   
914.       /* Add the signature verification flag and arguments. */
915. >     TS_VERIFY_CTX_add_flags(ctx, f | TS_VFY_SIGNATURE);
916.   
917.       /* Initialising the X509_STORE object. */

crypto/ts/ts_verify_ctx.c:39:1: start of procedure TS_VERIFY_CTX_add_flags()
  37.   }
  38.   
  39. > int TS_VERIFY_CTX_add_flags(TS_VERIFY_CTX *ctx, int f)
  40.   {
  41.       ctx->flags |= f;

crypto/ts/ts_verify_ctx.c:41:5: 
  39.   int TS_VERIFY_CTX_add_flags(TS_VERIFY_CTX *ctx, int f)
  40.   {
  41. >     ctx->flags |= f;
  42.       return ctx->flags;
  43.   }

crypto/ts/ts_verify_ctx.c:42:5: 
  40.   {
  41.       ctx->flags |= f;
  42. >     return ctx->flags;
  43.   }
  44.   

crypto/ts/ts_verify_ctx.c:43:1: return from a call to TS_VERIFY_CTX_add_flags
  41.       ctx->flags |= f;
  42.       return ctx->flags;
  43. > }
  44.   
  45.   int TS_VERIFY_CTX_set_flags(TS_VERIFY_CTX *ctx, int f)

apps/ts.c:918:9: 
916.   
917.       /* Initialising the X509_STORE object. */
918. >     if (TS_VERIFY_CTX_set_store(ctx, create_cert_store(CApath, CAfile, vpm))
919.               == NULL)
920.           goto err;

apps/ts.c:938:1: start of procedure create_cert_store()
  936.   }
  937.   
  938. > static X509_STORE *create_cert_store(char *CApath, char *CAfile, X509_VERIFY_PARAM *vpm)
  939.   {
  940.       X509_STORE *cert_ctx = NULL;

apps/ts.c:940:5: 
  938.   static X509_STORE *create_cert_store(char *CApath, char *CAfile, X509_VERIFY_PARAM *vpm)
  939.   {
  940. >     X509_STORE *cert_ctx = NULL;
  941.       X509_LOOKUP *lookup = NULL;
  942.       int i;

apps/ts.c:941:5: 
  939.   {
  940.       X509_STORE *cert_ctx = NULL;
  941. >     X509_LOOKUP *lookup = NULL;
  942.       int i;
  943.   

apps/ts.c:944:5: Skipping X509_STORE_new(): empty list of specs
  942.       int i;
  943.   
  944.       cert_ctx = X509_STORE_new();
             ^
  945.       X509_STORE_set_verify_cb(cert_ctx, verify_cb);
  946.       if (CApath != NULL) {

apps/ts.c:945:5: 
  943.   
  944.       cert_ctx = X509_STORE_new();
  945. >     X509_STORE_set_verify_cb(cert_ctx, verify_cb);
  946.       if (CApath != NULL) {
  947.           lookup = X509_STORE_add_lookup(cert_ctx, X509_LOOKUP_hash_dir());

crypto/x509/x509_lu.c:717:1: start of procedure X509_STORE_set_verify_cb()
    715.   }
    716.   
    717. > void X509_STORE_set_verify_cb(X509_STORE *ctx,
    718.                                 int (*verify_cb) (int, X509_STORE_CTX *))
    719.   {

crypto/x509/x509_lu.c:720:5: 
    718.                                 int (*verify_cb) (int, X509_STORE_CTX *))
    719.   {
    720. >     ctx->verify_cb = verify_cb;
    721.   }
    722.   

crypto/x509/x509_lu.c:721:1: return from a call to X509_STORE_set_verify_cb
    719.   {
    720.       ctx->verify_cb = verify_cb;
    721. > }
    722.   
    723.   void X509_STORE_set_verify(X509_STORE *ctx, X509_STORE_CTX_verify verify)

apps/ts.c:946:9: Taking false branch
  944.       cert_ctx = X509_STORE_new();
  945.       X509_STORE_set_verify_cb(cert_ctx, verify_cb);
  946.       if (CApath != NULL) {
                 ^
  947.           lookup = X509_STORE_add_lookup(cert_ctx, X509_LOOKUP_hash_dir());
  948.           if (lookup == NULL) {

apps/ts.c:959:9: Taking true branch
  957.       }
  958.   
  959.       if (CAfile != NULL) {
                 ^
  960.           lookup = X509_STORE_add_lookup(cert_ctx, X509_LOOKUP_file());
  961.           if (lookup == NULL) {

apps/ts.c:960:9: 
  958.   
  959.       if (CAfile != NULL) {
  960. >         lookup = X509_STORE_add_lookup(cert_ctx, X509_LOOKUP_file());
  961.           if (lookup == NULL) {
  962.               BIO_printf(bio_err, "memory allocation failure\n");

crypto/x509/by_file.c:36:1: start of procedure X509_LOOKUP_file()
    34.   };
    35.   
    36. > X509_LOOKUP_METHOD *X509_LOOKUP_file(void)
    37.   {
    38.       return (&x509_file_lookup);

crypto/x509/by_file.c:38:5: 
    36.   X509_LOOKUP_METHOD *X509_LOOKUP_file(void)
    37.   {
    38. >     return (&x509_file_lookup);
    39.   }
    40.   

crypto/x509/by_file.c:39:1: return from a call to X509_LOOKUP_file
    37.   {
    38.       return (&x509_file_lookup);
    39. > }
    40.   
    41.   static int by_file_ctrl(X509_LOOKUP *ctx, int cmd, const char *argp,

crypto/x509/x509_lu.c:221:1: start of procedure X509_STORE_add_lookup()
    219.   }
    220.   
    221. > X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m)
    222.   {
    223.       int i;

crypto/x509/x509_lu.c:227:5: 
    225.       X509_LOOKUP *lu;
    226.   
    227. >     sk = v->get_cert_methods;
    228.       for (i = 0; i < sk_X509_LOOKUP_num(sk); i++) {
    229.           lu = sk_X509_LOOKUP_value(sk, i);

crypto/x509/x509_lu.c:228:10: 
    226.   
    227.       sk = v->get_cert_methods;
    228. >     for (i = 0; i < sk_X509_LOOKUP_num(sk); i++) {
    229.           lu = sk_X509_LOOKUP_value(sk, i);
    230.           if (m == lu->method) {

crypto/x509/x509_lu.c:228:17: 
    226.   
    227.       sk = v->get_cert_methods;
    228. >     for (i = 0; i < sk_X509_LOOKUP_num(sk); i++) {
    229.           lu = sk_X509_LOOKUP_value(sk, i);
    230.           if (m == lu->method) {

include/openssl/x509_vfy.h:53:1: start of procedure sk_X509_LOOKUP_num()
      51.   
      52.   
      53. > DEFINE_STACK_OF(X509_LOOKUP)
      54.   DEFINE_STACK_OF(X509_OBJECT)
      55.   DEFINE_STACK_OF(X509_VERIFY_PARAM)

crypto/stack/stack.c:265:1: start of procedure OPENSSL_sk_num()
        263.   }
        264.   
        265. > int OPENSSL_sk_num(const OPENSSL_STACK *st)
        266.   {
        267.       if (st == NULL)

crypto/stack/stack.c:267:9: Taking true branch
        265.   int OPENSSL_sk_num(const OPENSSL_STACK *st)
        266.   {
        267.       if (st == NULL)
                       ^
        268.           return -1;
        269.       return st->num;

crypto/stack/stack.c:268:9: 
        266.   {
        267.       if (st == NULL)
        268. >         return -1;
        269.       return st->num;
        270.   }

crypto/stack/stack.c:270:1: return from a call to OPENSSL_sk_num
        268.           return -1;
        269.       return st->num;
        270. > }
        271.   
        272.   void *OPENSSL_sk_value(const OPENSSL_STACK *st, int i)

include/openssl/x509_vfy.h:53:1: return from a call to sk_X509_LOOKUP_num
      51.   
      52.   
      53. > DEFINE_STACK_OF(X509_LOOKUP)
      54.   DEFINE_STACK_OF(X509_OBJECT)
      55.   DEFINE_STACK_OF(X509_VERIFY_PARAM)

crypto/x509/x509_lu.c:228:17: Loop condition is false. Leaving loop
    226.   
    227.       sk = v->get_cert_methods;
    228.       for (i = 0; i < sk_X509_LOOKUP_num(sk); i++) {
                           ^
    229.           lu = sk_X509_LOOKUP_value(sk, i);
    230.           if (m == lu->method) {

crypto/x509/x509_lu.c:235:5: Skipping X509_LOOKUP_new(): empty list of specs
    233.       }
    234.       /* a new one */
    235.       lu = X509_LOOKUP_new(m);
               ^
    236.       if (lu == NULL)
    237.           return NULL;

crypto/x509/x509_lu.c:236:9: Taking true branch
    234.       /* a new one */
    235.       lu = X509_LOOKUP_new(m);
    236.       if (lu == NULL)
                   ^
    237.           return NULL;
    238.       else {

crypto/x509/x509_lu.c:237:9: 
    235.       lu = X509_LOOKUP_new(m);
    236.       if (lu == NULL)
    237. >         return NULL;
    238.       else {
    239.           lu->store_ctx = v;

crypto/x509/x509_lu.c:247:1: return from a call to X509_STORE_add_lookup
    245.           }
    246.       }
    247. > }
    248.   
    249.   X509_OBJECT *X509_STORE_CTX_get_obj_by_subject(X509_STORE_CTX *vs, int type,

apps/ts.c:961:13: Taking true branch
  959.       if (CAfile != NULL) {
  960.           lookup = X509_STORE_add_lookup(cert_ctx, X509_LOOKUP_file());
  961.           if (lookup == NULL) {
                     ^
  962.               BIO_printf(bio_err, "memory allocation failure\n");
  963.               goto err;

apps/ts.c:962:13: 
  960.           lookup = X509_STORE_add_lookup(cert_ctx, X509_LOOKUP_file());
  961.           if (lookup == NULL) {
  962. >             BIO_printf(bio_err, "memory allocation failure\n");
  963.               goto err;
  964.           }

crypto/bio/b_print.c:867:1: start of procedure BIO_printf()
    865.   /***************************************************************************/
    866.   
    867. > int BIO_printf(BIO *bio, const char *format, ...)
    868.   {
    869.       va_list args;

crypto/bio/b_print.c:872:5: 
    870.       int ret;
    871.   
    872. >     va_start(args, format);
    873.   
    874.       ret = BIO_vprintf(bio, format, args);

crypto/bio/b_print.c:874:5: Skipping BIO_vprintf(): empty list of specs
    872.       va_start(args, format);
    873.   
    874.       ret = BIO_vprintf(bio, format, args);
               ^
    875.   
    876.       va_end(args);

crypto/bio/b_print.c:876:5: 
    874.       ret = BIO_vprintf(bio, format, args);
    875.   
    876. >     va_end(args);
    877.       return (ret);
    878.   }

crypto/bio/b_print.c:877:5: 
    875.   
    876.       va_end(args);
    877. >     return (ret);
    878.   }
    879.   

crypto/bio/b_print.c:878:1: return from a call to BIO_printf
    876.       va_end(args);
    877.       return (ret);
    878. > }
    879.   
    880.   int BIO_vprintf(BIO *bio, const char *format, va_list args)

apps/ts.c:977:2: 
  975.       return cert_ctx;
  976.   
  977. >  err:
  978.       X509_STORE_free(cert_ctx);
  979.       return NULL;

apps/ts.c:978:5: 
  976.   
  977.    err:
  978. >     X509_STORE_free(cert_ctx);
  979.       return NULL;
  980.   }

crypto/x509/x509_lu.c:179:1: start of procedure X509_STORE_free()
    177.   }
    178.   
    179. > void X509_STORE_free(X509_STORE *vfy)
    180.   {
    181.       int i;

crypto/x509/x509_lu.c:185:9: Taking false branch
    183.       X509_LOOKUP *lu;
    184.   
    185.       if (vfy == NULL)
                   ^
    186.           return;
    187.   

crypto/x509/x509_lu.c:188:5: 
    186.           return;
    187.   
    188. >     CRYPTO_atomic_add(&vfy->references, -1, &i, vfy->lock);
    189.       REF_PRINT_COUNT("X509_STORE", vfy);
    190.       if (i > 0)

crypto/threads_pthread.c:110:1: start of procedure CRYPTO_atomic_add()
      108.   }
      109.   
      110. > int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock)
      111.   {
      112.   #ifdef __ATOMIC_RELAXED

crypto/threads_pthread.c:113:5: 
      111.   {
      112.   #ifdef __ATOMIC_RELAXED
      113. >     *ret = __atomic_add_fetch(val, amount, __ATOMIC_RELAXED);
      114.   #else
      115.       if (!CRYPTO_THREAD_write_lock(lock))

crypto/threads_pthread.c:125:5: 
      123.   #endif
      124.   
      125. >     return 1;
      126.   }
      127.   

crypto/threads_pthread.c:126:1: return from a call to CRYPTO_atomic_add
      124.   
      125.       return 1;
      126. > }
      127.   
      128.   #endif

crypto/x509/x509_lu.c:190:9: Taking false branch
    188.       CRYPTO_atomic_add(&vfy->references, -1, &i, vfy->lock);
    189.       REF_PRINT_COUNT("X509_STORE", vfy);
    190.       if (i > 0)
                   ^
    191.           return;
    192.       REF_ASSERT_ISNT(i < 0);

crypto/x509/x509_lu.c:194:5: 
    192.       REF_ASSERT_ISNT(i < 0);
    193.   
    194. >     sk = vfy->get_cert_methods;
    195.       for (i = 0; i < sk_X509_LOOKUP_num(sk); i++) {
    196.           lu = sk_X509_LOOKUP_value(sk, i);

crypto/x509/x509_lu.c:195:10: 
    193.   
    194.       sk = vfy->get_cert_methods;
    195. >     for (i = 0; i < sk_X509_LOOKUP_num(sk); i++) {
    196.           lu = sk_X509_LOOKUP_value(sk, i);
    197.           X509_LOOKUP_shutdown(lu);

crypto/x509/x509_lu.c:195:17: 
    193.   
    194.       sk = vfy->get_cert_methods;
    195. >     for (i = 0; i < sk_X509_LOOKUP_num(sk); i++) {
    196.           lu = sk_X509_LOOKUP_value(sk, i);
    197.           X509_LOOKUP_shutdown(lu);

include/openssl/x509_vfy.h:53:1: start of procedure sk_X509_LOOKUP_num()
      51.   
      52.   
      53. > DEFINE_STACK_OF(X509_LOOKUP)
      54.   DEFINE_STACK_OF(X509_OBJECT)
      55.   DEFINE_STACK_OF(X509_VERIFY_PARAM)

crypto/stack/stack.c:265:1: start of procedure OPENSSL_sk_num()
        263.   }
        264.   
        265. > int OPENSSL_sk_num(const OPENSSL_STACK *st)
        266.   {
        267.       if (st == NULL)

crypto/stack/stack.c:267:9: Taking true branch
        265.   int OPENSSL_sk_num(const OPENSSL_STACK *st)
        266.   {
        267.       if (st == NULL)
                       ^
        268.           return -1;
        269.       return st->num;

crypto/stack/stack.c:268:9: 
        266.   {
        267.       if (st == NULL)
        268. >         return -1;
        269.       return st->num;
        270.   }

crypto/stack/stack.c:270:1: return from a call to OPENSSL_sk_num
        268.           return -1;
        269.       return st->num;
        270. > }
        271.   
        272.   void *OPENSSL_sk_value(const OPENSSL_STACK *st, int i)

include/openssl/x509_vfy.h:53:1: return from a call to sk_X509_LOOKUP_num
      51.   
      52.   
      53. > DEFINE_STACK_OF(X509_LOOKUP)
      54.   DEFINE_STACK_OF(X509_OBJECT)
      55.   DEFINE_STACK_OF(X509_VERIFY_PARAM)

crypto/x509/x509_lu.c:195:17: Loop condition is false. Leaving loop
    193.   
    194.       sk = vfy->get_cert_methods;
    195.       for (i = 0; i < sk_X509_LOOKUP_num(sk); i++) {
                           ^
    196.           lu = sk_X509_LOOKUP_value(sk, i);
    197.           X509_LOOKUP_shutdown(lu);

crypto/x509/x509_lu.c:200:5: 
    198.           X509_LOOKUP_free(lu);
    199.       }
    200. >     sk_X509_LOOKUP_free(sk);
    201.       sk_X509_OBJECT_pop_free(vfy->objs, cleanup);
    202.   

include/openssl/x509_vfy.h:53:1: start of procedure sk_X509_LOOKUP_free()
      51.   
      52.   
      53. > DEFINE_STACK_OF(X509_LOOKUP)
      54.   DEFINE_STACK_OF(X509_OBJECT)
      55.   DEFINE_STACK_OF(X509_VERIFY_PARAM)

crypto/stack/stack.c:257:1: start of procedure OPENSSL_sk_free()
        255.   }
        256.   
        257. > void OPENSSL_sk_free(OPENSSL_STACK *st)
        258.   {
        259.       if (st == NULL)

crypto/stack/stack.c:259:9: Taking true branch
        257.   void OPENSSL_sk_free(OPENSSL_STACK *st)
        258.   {
        259.       if (st == NULL)
                       ^
        260.           return;
        261.       OPENSSL_free(st->data);

crypto/stack/stack.c:260:9: 
        258.   {
        259.       if (st == NULL)
        260. >         return;
        261.       OPENSSL_free(st->data);
        262.       OPENSSL_free(st);

crypto/stack/stack.c:263:1: return from a call to OPENSSL_sk_free
        261.       OPENSSL_free(st->data);
        262.       OPENSSL_free(st);
        263. > }
        264.   
        265.   int OPENSSL_sk_num(const OPENSSL_STACK *st)

include/openssl/x509_vfy.h:53:1: return from a call to sk_X509_LOOKUP_free
      51.   
      52.   
      53. > DEFINE_STACK_OF(X509_LOOKUP)
      54.   DEFINE_STACK_OF(X509_OBJECT)
      55.   DEFINE_STACK_OF(X509_VERIFY_PARAM)

crypto/x509/x509_lu.c:201:5: 
    199.       }
    200.       sk_X509_LOOKUP_free(sk);
    201. >     sk_X509_OBJECT_pop_free(vfy->objs, cleanup);
    202.   
    203.       CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509_STORE, vfy, &vfy->ex_data);

include/openssl/x509_vfy.h:54:1: start of procedure sk_X509_OBJECT_pop_free()
      52.   
      53.   DEFINE_STACK_OF(X509_LOOKUP)
      54. > DEFINE_STACK_OF(X509_OBJECT)
      55.   DEFINE_STACK_OF(X509_VERIFY_PARAM)
      56.   

include/openssl/x509_vfy.h:54:1: return from a call to sk_X509_OBJECT_pop_free
      52.   
      53.   DEFINE_STACK_OF(X509_LOOKUP)
      54. > DEFINE_STACK_OF(X509_OBJECT)
      55.   DEFINE_STACK_OF(X509_VERIFY_PARAM)
      56.   

crypto/x509/x509_lu.c:203:5: 
    201.       sk_X509_OBJECT_pop_free(vfy->objs, cleanup);
    202.   
    203. >     CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509_STORE, vfy, &vfy->ex_data);
    204.       X509_VERIFY_PARAM_free(vfy->param);
    205.       CRYPTO_THREAD_lock_free(vfy->lock);

crypto/ex_data.c:299:1: start of procedure CRYPTO_free_ex_data()
      297.    * each index in the class used by this variable
      298.    */
      299. > void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad)
      300.   {
      301.       int mx, i;

crypto/ex_data.c:305:5: 
      303.       void *ptr;
      304.       EX_CALLBACK *stack[10];
      305. >     EX_CALLBACK **storage = NULL;
      306.   
      307.       if ((ip = get_and_lock(class_index)) == NULL)

crypto/ex_data.c:307:9: 
      305.       EX_CALLBACK **storage = NULL;
      306.   
      307. >     if ((ip = get_and_lock(class_index)) == NULL)
      308.           return;
      309.   

crypto/ex_data.c:47:1: start of procedure get_and_lock()
        45.    * a given class.  On success, *holds the lock.*
        46.    */
        47. > static EX_CALLBACKS *get_and_lock(int class_index)
        48.   {
        49.       EX_CALLBACKS *ip;

crypto/ex_data.c:51:9: Taking false branch
        49.       EX_CALLBACKS *ip;
        50.   
        51.       if (class_index < 0 || class_index >= CRYPTO_EX_INDEX__COUNT) {
                      ^
        52.           CRYPTOerr(CRYPTO_F_GET_AND_LOCK, ERR_R_PASSED_INVALID_ARGUMENT);
        53.           return NULL;

crypto/ex_data.c:51:28: Taking false branch
        49.       EX_CALLBACKS *ip;
        50.   
        51.       if (class_index < 0 || class_index >= CRYPTO_EX_INDEX__COUNT) {
                                         ^
        52.           CRYPTOerr(CRYPTO_F_GET_AND_LOCK, ERR_R_PASSED_INVALID_ARGUMENT);
        53.           return NULL;

crypto/ex_data.c:56:5: 
        54.       }
        55.   
        56. >     CRYPTO_THREAD_run_once(&ex_data_init, do_ex_data_init);
        57.   
        58.       if (ex_data_lock == NULL) {

crypto/threads_pthread.c:63:1: start of procedure CRYPTO_THREAD_run_once()
          61.   }
          62.   
          63. > int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void))
          64.   {
          65.       if (pthread_once(once, init) != 0)

crypto/threads_pthread.c:65:9: Taking true branch
          63.   int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void))
          64.   {
          65.       if (pthread_once(once, init) != 0)
                        ^
          66.           return 0;
          67.   

crypto/threads_pthread.c:66:9: 
          64.   {
          65.       if (pthread_once(once, init) != 0)
          66. >         return 0;
          67.   
          68.       return 1;

crypto/threads_pthread.c:69:1: return from a call to CRYPTO_THREAD_run_once
          67.   
          68.       return 1;
          69. > }
          70.   
          71.   int CRYPTO_THREAD_init_local(CRYPTO_THREAD_LOCAL *key, void (*cleanup)(void *))

crypto/ex_data.c:58:9: Taking true branch
        56.       CRYPTO_THREAD_run_once(&ex_data_init, do_ex_data_init);
        57.   
        58.       if (ex_data_lock == NULL) {
                      ^
        59.           /*
        60.            * This can happen in normal operation when using CRYPTO_mem_leaks().

crypto/ex_data.c:68:10: 
        66.            * ignore this operation. We just treat it as an error.
        67.            */
        68. >          return NULL;
        69.       }
        70.   

crypto/ex_data.c:74:1: return from a call to get_and_lock
        72.       CRYPTO_THREAD_write_lock(ex_data_lock);
        73.       return ip;
        74. > }
        75.   
        76.   static void cleanup_cb(EX_CALLBACK *funcs)

crypto/ex_data.c:307:9: Taking true branch
      305.       EX_CALLBACK **storage = NULL;
      306.   
      307.       if ((ip = get_and_lock(class_index)) == NULL)
                     ^
      308.           return;
      309.   

crypto/ex_data.c:308:9: 
      306.   
      307.       if ((ip = get_and_lock(class_index)) == NULL)
      308. >         return;
      309.   
      310.       mx = sk_EX_CALLBACK_num(ip->meth);

crypto/ex_data.c:338:1: return from a call to CRYPTO_free_ex_data
      336.       sk_void_free(ad->sk);
      337.       ad->sk = NULL;
      338. > }
      339.   
      340.   /*

crypto/x509/x509_lu.c:204:5: 
    202.   
    203.       CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509_STORE, vfy, &vfy->ex_data);
    204. >     X509_VERIFY_PARAM_free(vfy->param);
    205.       CRYPTO_THREAD_lock_free(vfy->lock);
    206.       OPENSSL_free(vfy);

crypto/x509/x509_vpm.c:121:1: start of procedure X509_VERIFY_PARAM_free()
      119.   }
      120.   
      121. > void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param)
      122.   {
      123.       if (!param)

crypto/x509/x509_vpm.c:123:10: Taking true branch
      121.   void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param)
      122.   {
      123.       if (!param)
                      ^
      124.           return;
      125.       x509_verify_param_zero(param);

crypto/x509/x509_vpm.c:124:9: 
      122.   {
      123.       if (!param)
      124. >         return;
      125.       x509_verify_param_zero(param);
      126.       OPENSSL_free(param);

crypto/x509/x509_vpm.c:127:1: return from a call to X509_VERIFY_PARAM_free
      125.       x509_verify_param_zero(param);
      126.       OPENSSL_free(param);
      127. > }
      128.   
      129.   /*-

crypto/x509/x509_lu.c:205:5: 
    203.       CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509_STORE, vfy, &vfy->ex_data);
    204.       X509_VERIFY_PARAM_free(vfy->param);
    205. >     CRYPTO_THREAD_lock_free(vfy->lock);
    206.       OPENSSL_free(vfy);
    207.   }

crypto/threads_pthread.c:52:1: start of procedure CRYPTO_THREAD_lock_free()
      50.   }
      51.   
      52. > void CRYPTO_THREAD_lock_free(CRYPTO_RWLOCK *lock)
      53.   {
      54.       if (lock == NULL)

crypto/threads_pthread.c:54:9: Taking false branch
      52.   void CRYPTO_THREAD_lock_free(CRYPTO_RWLOCK *lock)
      53.   {
      54.       if (lock == NULL)
                    ^
      55.           return;
      56.   

crypto/threads_pthread.c:57:5: Skipping pthread_rwlock_destroy(): method has no implementation
      55.           return;
      56.   
      57.       pthread_rwlock_destroy(lock);
                ^
      58.       OPENSSL_free(lock);
      59.   

crypto/threads_pthread.c:58:5: 
      56.   
      57.       pthread_rwlock_destroy(lock);
      58. >     OPENSSL_free(lock);
      59.   
      60.       return;

crypto/mem.c:163:1: start of procedure CRYPTO_free()
        161.   }
        162.   
        163. > void CRYPTO_free(void *str, const char *file, int line)
        164.   {
        165.       if (free_impl != NULL && free_impl != &CRYPTO_free) {

crypto/mem.c:165:9: Taking false branch
        163.   void CRYPTO_free(void *str, const char *file, int line)
        164.   {
        165.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                       ^
        166.           free_impl(str, file, line);
        167.           return;

crypto/mem.c:179:5: 
        177.       }
        178.   #else
        179. >     free(str);
        180.   #endif
        181.   }

crypto/mem.c:181:1: return from a call to CRYPTO_free
        179.       free(str);
        180.   #endif
        181. > }
        182.   
        183.   void CRYPTO_clear_free(void *str, size_t num, const char *file, int line)

crypto/threads_pthread.c:60:5: 
      58.       OPENSSL_free(lock);
      59.   
      60. >     return;
      61.   }
      62.   

crypto/threads_pthread.c:61:1: return from a call to CRYPTO_THREAD_lock_free
      59.   
      60.       return;
      61. > }
      62.   
      63.   int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void))

crypto/x509/x509_lu.c:206:5: 
    204.       X509_VERIFY_PARAM_free(vfy->param);
    205.       CRYPTO_THREAD_lock_free(vfy->lock);
    206. >     OPENSSL_free(vfy);
    207.   }
    208.   

crypto/mem.c:163:1: start of procedure CRYPTO_free()
      161.   }
      162.   
      163. > void CRYPTO_free(void *str, const char *file, int line)
      164.   {
      165.       if (free_impl != NULL && free_impl != &CRYPTO_free) {

crypto/mem.c:165:9: Taking false branch
      163.   void CRYPTO_free(void *str, const char *file, int line)
      164.   {
      165.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                     ^
      166.           free_impl(str, file, line);
      167.           return;

crypto/mem.c:179:5: 
      177.       }
      178.   #else
      179. >     free(str);
      180.   #endif
      181.   }

crypto/mem.c:181:1: return from a call to CRYPTO_free
      179.       free(str);
      180.   #endif
      181. > }
      182.   
      183.   void CRYPTO_clear_free(void *str, size_t num, const char *file, int line)

crypto/x509/x509_lu.c:207:1: return from a call to X509_STORE_free
    205.       CRYPTO_THREAD_lock_free(vfy->lock);
    206.       OPENSSL_free(vfy);
    207. > }
    208.   
    209.   int X509_STORE_up_ref(X509_STORE *vfy)

apps/ts.c:979:5: 
  977.    err:
  978.       X509_STORE_free(cert_ctx);
  979. >     return NULL;
  980.   }
  981.   

apps/ts.c:980:1: return from a call to create_cert_store
  978.       X509_STORE_free(cert_ctx);
  979.       return NULL;
  980. > }
  981.   
  982.   static int verify_cb(int ok, X509_STORE_CTX *ctx)

crypto/ts/ts_verify_ctx.c:57:1: start of procedure TS_VERIFY_CTX_set_store()
  55.   }
  56.   
  57. > X509_STORE *TS_VERIFY_CTX_set_store(TS_VERIFY_CTX *ctx, X509_STORE *s)
  58.   {
  59.       ctx->store = s;

crypto/ts/ts_verify_ctx.c:59:5: 
  57.   X509_STORE *TS_VERIFY_CTX_set_store(TS_VERIFY_CTX *ctx, X509_STORE *s)
  58.   {
  59. >     ctx->store = s;
  60.       return ctx->store;
  61.   }

crypto/ts/ts_verify_ctx.c:60:5: 
  58.   {
  59.       ctx->store = s;
  60. >     return ctx->store;
  61.   }
  62.   

crypto/ts/ts_verify_ctx.c:61:1: return from a call to TS_VERIFY_CTX_set_store
  59.       ctx->store = s;
  60.       return ctx->store;
  61. > }
  62.   
  63.   STACK_OF(X509) *TS_VERIFY_CTS_set_certs(TS_VERIFY_CTX *ctx,

apps/ts.c:918:9: Taking true branch
916.   
917.       /* Initialising the X509_STORE object. */
918.       if (TS_VERIFY_CTX_set_store(ctx, create_cert_store(CApath, CAfile, vpm))
               ^
919.               == NULL)
920.           goto err;

apps/ts.c:928:2: 
926.       ret = 1;
927.   
928. >  err:
929.       if (!ret) {
930.           TS_VERIFY_CTX_free(ctx);

apps/ts.c:929:10: Taking true branch
927.   
928.    err:
929.       if (!ret) {
                ^
930.           TS_VERIFY_CTX_free(ctx);
931.           ctx = NULL;

apps/ts.c:930:9: 
928.    err:
929.       if (!ret) {
930. >         TS_VERIFY_CTX_free(ctx);
931.           ctx = NULL;
932.       }

crypto/ts/ts_verify_ctx.c:30:1: start of procedure TS_VERIFY_CTX_free()
  28.   }
  29.   
  30. > void TS_VERIFY_CTX_free(TS_VERIFY_CTX *ctx)
  31.   {
  32.       if (!ctx)

crypto/ts/ts_verify_ctx.c:32:10: Taking false branch
  30.   void TS_VERIFY_CTX_free(TS_VERIFY_CTX *ctx)
  31.   {
  32.       if (!ctx)
                 ^
  33.           return;
  34.   

crypto/ts/ts_verify_ctx.c:35:5: Skipping TS_VERIFY_CTX_cleanup(): empty list of specs
  33.           return;
  34.   
  35.       TS_VERIFY_CTX_cleanup(ctx);
            ^
  36.       OPENSSL_free(ctx);
  37.   }

crypto/ts/ts_verify_ctx.c:36:5: 
  34.   
  35.       TS_VERIFY_CTX_cleanup(ctx);
  36. >     OPENSSL_free(ctx);
  37.   }
  38.   

crypto/mem.c:163:1: start of procedure CRYPTO_free()
    161.   }
    162.   
    163. > void CRYPTO_free(void *str, const char *file, int line)
    164.   {
    165.       if (free_impl != NULL && free_impl != &CRYPTO_free) {

crypto/mem.c:165:9: Taking true branch
    163.   void CRYPTO_free(void *str, const char *file, int line)
    164.   {
    165.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                   ^
    166.           free_impl(str, file, line);
    167.           return;

crypto/mem.c:165:30: Taking true branch
    163.   void CRYPTO_free(void *str, const char *file, int line)
    164.   {
    165.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                                        ^
    166.           free_impl(str, file, line);
    167.           return;

crypto/mem.c:166:9: Skipping __function_pointer__(): unresolved function pointer
    164.   {
    165.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
    166.           free_impl(str, file, line);
                   ^
    167.           return;
    168.       }

crypto/mem.c:167:9: 
    165.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
    166.           free_impl(str, file, line);
    167. >         return;
    168.       }
    169.   

crypto/mem.c:181:1: return from a call to CRYPTO_free
    179.       free(str);
    180.   #endif
    181. > }
    182.   
    183.   void CRYPTO_clear_free(void *str, size_t num, const char *file, int line)

crypto/ts/ts_verify_ctx.c:37:1: return from a call to TS_VERIFY_CTX_free
  35.       TS_VERIFY_CTX_cleanup(ctx);
  36.       OPENSSL_free(ctx);
  37. > }
  38.   
  39.   int TS_VERIFY_CTX_add_flags(TS_VERIFY_CTX *ctx, int f)
