apps/apps.c:1637: error: MEMORY_LEAK
  memory dynamically allocated by call to `TXT_DB_create_index()` at line 1627, column 10 is not reachable after line 1637, column 13.
Showing all 141 steps of the trace


apps/apps.c:1625:1: start of procedure index_index()
1623.   }
1624.   
1625. > int index_index(CA_DB *db)
1626.   {
1627.       if (!TXT_DB_create_index(db->db, DB_serial, NULL,

apps/apps.c:1627:10: 
1625.   int index_index(CA_DB *db)
1626.   {
1627. >     if (!TXT_DB_create_index(db->db, DB_serial, NULL,
1628.                                LHASH_HASH_FN(index_serial),
1629.                                LHASH_COMP_FN(index_serial))) {

crypto/txt_db/txt_db.c:195:1: start of procedure TXT_DB_create_index()
  193.   }
  194.   
  195. > int TXT_DB_create_index(TXT_DB *db, int field, int (*qual) (OPENSSL_STRING *),
  196.                           LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE cmp)
  197.   {

crypto/txt_db/txt_db.c:202:9: Taking false branch
  200.       int i, n;
  201.   
  202.       if (field >= db->num_fields) {
                 ^
  203.           db->error = DB_ERROR_INDEX_OUT_OF_RANGE;
  204.           return (0);

crypto/txt_db/txt_db.c:207:9: 
  205.       }
  206.       /* FIXME: we lose type checking at this point */
  207. >     if ((idx = (LHASH_OF(OPENSSL_STRING) *)lh_new(hash, cmp)) == NULL) {
  208.           db->error = DB_ERROR_MALLOC;
  209.           return (0);

crypto/lhash/lhash.c:112:1: start of procedure lh_new()
    110.   static LHASH_NODE **getrn(_LHASH *lh, const void *data, unsigned long *rhash);
    111.   
    112. > _LHASH *lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c)
    113.   {
    114.       _LHASH *ret;

crypto/lhash/lhash.c:116:9: 
    114.       _LHASH *ret;
    115.   
    116. >     if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
    117.           goto err0;
    118.       if ((ret->b = OPENSSL_zalloc(sizeof(*ret->b) * MIN_NODES)) == NULL)

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

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

crypto/mem.c:119:1: start of procedure CRYPTO_malloc()
        117.   }
        118.   
        119. > void *CRYPTO_malloc(size_t num, const char *file, int line)
        120.   {
        121.       void *ret = NULL;

crypto/mem.c:121:5: 
        119.   void *CRYPTO_malloc(size_t num, const char *file, int line)
        120.   {
        121. >     void *ret = NULL;
        122.   
        123.       if (num <= 0)

crypto/mem.c:123:9: Taking false branch
        121.       void *ret = NULL;
        122.   
        123.       if (num <= 0)
                       ^
        124.           return NULL;
        125.   

crypto/mem.c:126:5: 
        124.           return NULL;
        125.   
        126. >     allow_customize = 0;
        127.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
        128.       if (call_malloc_debug) {

crypto/mem.c:136:5: 
        134.       }
        135.   #else
        136. >     (void)file;
        137.       (void)line;
        138.       ret = malloc(num);

crypto/mem.c:137:5: 
        135.   #else
        136.       (void)file;
        137. >     (void)line;
        138.       ret = malloc(num);
        139.   #endif

crypto/mem.c:138:5: 
        136.       (void)file;
        137.       (void)line;
        138. >     ret = malloc(num);
        139.   #endif
        140.   

crypto/mem.c:153:5: 
        151.   #endif
        152.   
        153. >     return ret;
        154.   }
        155.   

crypto/mem.c:154:1: return from a call to CRYPTO_malloc
        152.   
        153.       return ret;
        154. > }
        155.   
        156.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:160:9: Taking true branch
      158.       void *ret = CRYPTO_malloc(num, file, line);
      159.   
      160.       if (ret != NULL)
                     ^
      161.           memset(ret, 0, num);
      162.       return ret;

crypto/mem.c:161:9: 
      159.   
      160.       if (ret != NULL)
      161. >         memset(ret, 0, num);
      162.       return ret;
      163.   }

crypto/mem.c:162:5: 
      160.       if (ret != NULL)
      161.           memset(ret, 0, num);
      162. >     return ret;
      163.   }
      164.   

crypto/mem.c:163:1: return from a call to CRYPTO_zalloc
      161.           memset(ret, 0, num);
      162.       return ret;
      163. > }
      164.   
      165.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/lhash/lhash.c:116:9: Taking false branch
    114.       _LHASH *ret;
    115.   
    116.       if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
                   ^
    117.           goto err0;
    118.       if ((ret->b = OPENSSL_zalloc(sizeof(*ret->b) * MIN_NODES)) == NULL)

crypto/lhash/lhash.c:118:9: 
    116.       if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
    117.           goto err0;
    118. >     if ((ret->b = OPENSSL_zalloc(sizeof(*ret->b) * MIN_NODES)) == NULL)
    119.           goto err1;
    120.       ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);

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

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

crypto/mem.c:119:1: start of procedure CRYPTO_malloc()
        117.   }
        118.   
        119. > void *CRYPTO_malloc(size_t num, const char *file, int line)
        120.   {
        121.       void *ret = NULL;

crypto/mem.c:121:5: 
        119.   void *CRYPTO_malloc(size_t num, const char *file, int line)
        120.   {
        121. >     void *ret = NULL;
        122.   
        123.       if (num <= 0)

crypto/mem.c:123:9: Taking false branch
        121.       void *ret = NULL;
        122.   
        123.       if (num <= 0)
                       ^
        124.           return NULL;
        125.   

crypto/mem.c:126:5: 
        124.           return NULL;
        125.   
        126. >     allow_customize = 0;
        127.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
        128.       if (call_malloc_debug) {

crypto/mem.c:136:5: 
        134.       }
        135.   #else
        136. >     (void)file;
        137.       (void)line;
        138.       ret = malloc(num);

crypto/mem.c:137:5: 
        135.   #else
        136.       (void)file;
        137. >     (void)line;
        138.       ret = malloc(num);
        139.   #endif

crypto/mem.c:138:5: 
        136.       (void)file;
        137.       (void)line;
        138. >     ret = malloc(num);
        139.   #endif
        140.   

crypto/mem.c:153:5: 
        151.   #endif
        152.   
        153. >     return ret;
        154.   }
        155.   

crypto/mem.c:154:1: return from a call to CRYPTO_malloc
        152.   
        153.       return ret;
        154. > }
        155.   
        156.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:160:9: Taking true branch
      158.       void *ret = CRYPTO_malloc(num, file, line);
      159.   
      160.       if (ret != NULL)
                     ^
      161.           memset(ret, 0, num);
      162.       return ret;

crypto/mem.c:161:9: 
      159.   
      160.       if (ret != NULL)
      161. >         memset(ret, 0, num);
      162.       return ret;
      163.   }

crypto/mem.c:162:5: 
      160.       if (ret != NULL)
      161.           memset(ret, 0, num);
      162. >     return ret;
      163.   }
      164.   

crypto/mem.c:163:1: return from a call to CRYPTO_zalloc
      161.           memset(ret, 0, num);
      162.       return ret;
      163. > }
      164.   
      165.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/lhash/lhash.c:118:9: Taking false branch
    116.       if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
    117.           goto err0;
    118.       if ((ret->b = OPENSSL_zalloc(sizeof(*ret->b) * MIN_NODES)) == NULL)
                   ^
    119.           goto err1;
    120.       ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);

crypto/lhash/lhash.c:120:19: Condition is false
    118.       if ((ret->b = OPENSSL_zalloc(sizeof(*ret->b) * MIN_NODES)) == NULL)
    119.           goto err1;
    120.       ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);
                             ^
    121.       ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h);
    122.       ret->num_nodes = MIN_NODES / 2;

crypto/lhash/lhash.c:120:18: 
    118.       if ((ret->b = OPENSSL_zalloc(sizeof(*ret->b) * MIN_NODES)) == NULL)
    119.           goto err1;
    120. >     ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);
    121.       ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h);
    122.       ret->num_nodes = MIN_NODES / 2;

crypto/lhash/lhash.c:120:5: 
    118.       if ((ret->b = OPENSSL_zalloc(sizeof(*ret->b) * MIN_NODES)) == NULL)
    119.           goto err1;
    120. >     ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);
    121.       ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h);
    122.       ret->num_nodes = MIN_NODES / 2;

crypto/lhash/lhash.c:121:19: Condition is false
    119.           goto err1;
    120.       ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);
    121.       ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h);
                             ^
    122.       ret->num_nodes = MIN_NODES / 2;
    123.       ret->num_alloc_nodes = MIN_NODES;

crypto/lhash/lhash.c:121:18: 
    119.           goto err1;
    120.       ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);
    121. >     ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h);
    122.       ret->num_nodes = MIN_NODES / 2;
    123.       ret->num_alloc_nodes = MIN_NODES;

crypto/lhash/lhash.c:121:5: 
    119.           goto err1;
    120.       ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);
    121. >     ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h);
    122.       ret->num_nodes = MIN_NODES / 2;
    123.       ret->num_alloc_nodes = MIN_NODES;

crypto/lhash/lhash.c:122:5: 
    120.       ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);
    121.       ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h);
    122. >     ret->num_nodes = MIN_NODES / 2;
    123.       ret->num_alloc_nodes = MIN_NODES;
    124.       ret->pmax = MIN_NODES / 2;

crypto/lhash/lhash.c:123:5: 
    121.       ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h);
    122.       ret->num_nodes = MIN_NODES / 2;
    123. >     ret->num_alloc_nodes = MIN_NODES;
    124.       ret->pmax = MIN_NODES / 2;
    125.       ret->up_load = UP_LOAD;

crypto/lhash/lhash.c:124:5: 
    122.       ret->num_nodes = MIN_NODES / 2;
    123.       ret->num_alloc_nodes = MIN_NODES;
    124. >     ret->pmax = MIN_NODES / 2;
    125.       ret->up_load = UP_LOAD;
    126.       ret->down_load = DOWN_LOAD;

crypto/lhash/lhash.c:125:5: 
    123.       ret->num_alloc_nodes = MIN_NODES;
    124.       ret->pmax = MIN_NODES / 2;
    125. >     ret->up_load = UP_LOAD;
    126.       ret->down_load = DOWN_LOAD;
    127.       return (ret);

crypto/lhash/lhash.c:126:5: 
    124.       ret->pmax = MIN_NODES / 2;
    125.       ret->up_load = UP_LOAD;
    126. >     ret->down_load = DOWN_LOAD;
    127.       return (ret);
    128.   

crypto/lhash/lhash.c:127:5: 
    125.       ret->up_load = UP_LOAD;
    126.       ret->down_load = DOWN_LOAD;
    127. >     return (ret);
    128.   
    129.    err1:

crypto/lhash/lhash.c:133:1: return from a call to lh_new
    131.    err0:
    132.       return (NULL);
    133. > }
    134.   
    135.   void lh_free(_LHASH *lh)

crypto/txt_db/txt_db.c:207:9: Taking false branch
  205.       }
  206.       /* FIXME: we lose type checking at this point */
  207.       if ((idx = (LHASH_OF(OPENSSL_STRING) *)lh_new(hash, cmp)) == NULL) {
                 ^
  208.           db->error = DB_ERROR_MALLOC;
  209.           return (0);

crypto/txt_db/txt_db.c:211:5: 
  209.           return (0);
  210.       }
  211. >     n = sk_OPENSSL_PSTRING_num(db->data);
  212.       for (i = 0; i < n; i++) {
  213.           r = sk_OPENSSL_PSTRING_value(db->data, i);

include/openssl/txt_db.h:79:1: start of procedure sk_OPENSSL_PSTRING_num()
    77.   
    78.   typedef OPENSSL_STRING *OPENSSL_PSTRING;
    79. > DEFINE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING)
    80.   
    81.   typedef struct txt_db_st {

crypto/stack/stack.c:316:1: start of procedure sk_num()
      314.   }
      315.   
      316. > int sk_num(const _STACK *st)
      317.   {
      318.       if (st == NULL)

crypto/stack/stack.c:318:9: Taking true branch
      316.   int sk_num(const _STACK *st)
      317.   {
      318.       if (st == NULL)
                     ^
      319.           return -1;
      320.       return st->num;

crypto/stack/stack.c:319:9: 
      317.   {
      318.       if (st == NULL)
      319. >         return -1;
      320.       return st->num;
      321.   }

crypto/stack/stack.c:321:1: return from a call to sk_num
      319.           return -1;
      320.       return st->num;
      321. > }
      322.   
      323.   void *sk_value(const _STACK *st, int i)

include/openssl/txt_db.h:79:1: return from a call to sk_OPENSSL_PSTRING_num
    77.   
    78.   typedef OPENSSL_STRING *OPENSSL_PSTRING;
    79. > DEFINE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING)
    80.   
    81.   typedef struct txt_db_st {

crypto/txt_db/txt_db.c:212:10: 
  210.       }
  211.       n = sk_OPENSSL_PSTRING_num(db->data);
  212. >     for (i = 0; i < n; i++) {
  213.           r = sk_OPENSSL_PSTRING_value(db->data, i);
  214.           if ((qual != NULL) && (qual(r) == 0))

crypto/txt_db/txt_db.c:212:17: Loop condition is false. Leaving loop
  210.       }
  211.       n = sk_OPENSSL_PSTRING_num(db->data);
  212.       for (i = 0; i < n; i++) {
                         ^
  213.           r = sk_OPENSSL_PSTRING_value(db->data, i);
  214.           if ((qual != NULL) && (qual(r) == 0))

crypto/txt_db/txt_db.c:224:5: 
  222.           }
  223.       }
  224. >     lh_OPENSSL_STRING_free(db->index[field]);
  225.       db->index[field] = idx;
  226.       db->qual[field] = qual;

include/openssl/lhash.h:269:1: start of procedure lh_OPENSSL_STRING_free()
    267.     lh_doall_arg(CHECKED_LHASH_OF(type, lh), fn, CHECKED_PTR_OF(arg_type, arg))
    268.   
    269. > DEFINE_LHASH_OF(OPENSSL_STRING);
    270.   DEFINE_LHASH_OF(OPENSSL_CSTRING);
    271.   

include/openssl/lhash.h:269:1: return from a call to lh_OPENSSL_STRING_free
    267.     lh_doall_arg(CHECKED_LHASH_OF(type, lh), fn, CHECKED_PTR_OF(arg_type, arg))
    268.   
    269. > DEFINE_LHASH_OF(OPENSSL_STRING);
    270.   DEFINE_LHASH_OF(OPENSSL_CSTRING);
    271.   

crypto/txt_db/txt_db.c:225:5: 
  223.       }
  224.       lh_OPENSSL_STRING_free(db->index[field]);
  225. >     db->index[field] = idx;
  226.       db->qual[field] = qual;
  227.       return (1);

crypto/txt_db/txt_db.c:226:5: 
  224.       lh_OPENSSL_STRING_free(db->index[field]);
  225.       db->index[field] = idx;
  226. >     db->qual[field] = qual;
  227.       return (1);
  228.   }

crypto/txt_db/txt_db.c:227:5: 
  225.       db->index[field] = idx;
  226.       db->qual[field] = qual;
  227. >     return (1);
  228.   }
  229.   

crypto/txt_db/txt_db.c:228:1: return from a call to TXT_DB_create_index
  226.       db->qual[field] = qual;
  227.       return (1);
  228. > }
  229.   
  230.   long TXT_DB_write(BIO *out, TXT_DB *db)

apps/apps.c:1627:10: Taking false branch
1625.   int index_index(CA_DB *db)
1626.   {
1627.       if (!TXT_DB_create_index(db->db, DB_serial, NULL,
                 ^
1628.                                LHASH_HASH_FN(index_serial),
1629.                                LHASH_COMP_FN(index_serial))) {

apps/apps.c:1636:9: Taking true branch
1634.       }
1635.   
1636.       if (db->attributes.unique_subject
                ^
1637.           && !TXT_DB_create_index(db->db, DB_name, index_name_qual,
1638.                                   LHASH_HASH_FN(index_name),

apps/apps.c:1637:13: 
1635.   
1636.       if (db->attributes.unique_subject
1637. >         && !TXT_DB_create_index(db->db, DB_name, index_name_qual,
1638.                                   LHASH_HASH_FN(index_name),
1639.                                   LHASH_COMP_FN(index_name))) {

crypto/txt_db/txt_db.c:195:1: start of procedure TXT_DB_create_index()
  193.   }
  194.   
  195. > int TXT_DB_create_index(TXT_DB *db, int field, int (*qual) (OPENSSL_STRING *),
  196.                           LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE cmp)
  197.   {

crypto/txt_db/txt_db.c:202:9: Taking false branch
  200.       int i, n;
  201.   
  202.       if (field >= db->num_fields) {
                 ^
  203.           db->error = DB_ERROR_INDEX_OUT_OF_RANGE;
  204.           return (0);

crypto/txt_db/txt_db.c:207:9: 
  205.       }
  206.       /* FIXME: we lose type checking at this point */
  207. >     if ((idx = (LHASH_OF(OPENSSL_STRING) *)lh_new(hash, cmp)) == NULL) {
  208.           db->error = DB_ERROR_MALLOC;
  209.           return (0);

crypto/lhash/lhash.c:112:1: start of procedure lh_new()
    110.   static LHASH_NODE **getrn(_LHASH *lh, const void *data, unsigned long *rhash);
    111.   
    112. > _LHASH *lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c)
    113.   {
    114.       _LHASH *ret;

crypto/lhash/lhash.c:116:9: 
    114.       _LHASH *ret;
    115.   
    116. >     if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
    117.           goto err0;
    118.       if ((ret->b = OPENSSL_zalloc(sizeof(*ret->b) * MIN_NODES)) == NULL)

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

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

crypto/mem.c:119:1: start of procedure CRYPTO_malloc()
        117.   }
        118.   
        119. > void *CRYPTO_malloc(size_t num, const char *file, int line)
        120.   {
        121.       void *ret = NULL;

crypto/mem.c:121:5: 
        119.   void *CRYPTO_malloc(size_t num, const char *file, int line)
        120.   {
        121. >     void *ret = NULL;
        122.   
        123.       if (num <= 0)

crypto/mem.c:123:9: Taking false branch
        121.       void *ret = NULL;
        122.   
        123.       if (num <= 0)
                       ^
        124.           return NULL;
        125.   

crypto/mem.c:126:5: 
        124.           return NULL;
        125.   
        126. >     allow_customize = 0;
        127.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
        128.       if (call_malloc_debug) {

crypto/mem.c:136:5: 
        134.       }
        135.   #else
        136. >     (void)file;
        137.       (void)line;
        138.       ret = malloc(num);

crypto/mem.c:137:5: 
        135.   #else
        136.       (void)file;
        137. >     (void)line;
        138.       ret = malloc(num);
        139.   #endif

crypto/mem.c:138:5: 
        136.       (void)file;
        137.       (void)line;
        138. >     ret = malloc(num);
        139.   #endif
        140.   

crypto/mem.c:153:5: 
        151.   #endif
        152.   
        153. >     return ret;
        154.   }
        155.   

crypto/mem.c:154:1: return from a call to CRYPTO_malloc
        152.   
        153.       return ret;
        154. > }
        155.   
        156.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:160:9: Taking true branch
      158.       void *ret = CRYPTO_malloc(num, file, line);
      159.   
      160.       if (ret != NULL)
                     ^
      161.           memset(ret, 0, num);
      162.       return ret;

crypto/mem.c:161:9: 
      159.   
      160.       if (ret != NULL)
      161. >         memset(ret, 0, num);
      162.       return ret;
      163.   }

crypto/mem.c:162:5: 
      160.       if (ret != NULL)
      161.           memset(ret, 0, num);
      162. >     return ret;
      163.   }
      164.   

crypto/mem.c:163:1: return from a call to CRYPTO_zalloc
      161.           memset(ret, 0, num);
      162.       return ret;
      163. > }
      164.   
      165.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/lhash/lhash.c:116:9: Taking false branch
    114.       _LHASH *ret;
    115.   
    116.       if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
                   ^
    117.           goto err0;
    118.       if ((ret->b = OPENSSL_zalloc(sizeof(*ret->b) * MIN_NODES)) == NULL)

crypto/lhash/lhash.c:118:9: 
    116.       if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
    117.           goto err0;
    118. >     if ((ret->b = OPENSSL_zalloc(sizeof(*ret->b) * MIN_NODES)) == NULL)
    119.           goto err1;
    120.       ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);

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

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

crypto/mem.c:119:1: start of procedure CRYPTO_malloc()
        117.   }
        118.   
        119. > void *CRYPTO_malloc(size_t num, const char *file, int line)
        120.   {
        121.       void *ret = NULL;

crypto/mem.c:121:5: 
        119.   void *CRYPTO_malloc(size_t num, const char *file, int line)
        120.   {
        121. >     void *ret = NULL;
        122.   
        123.       if (num <= 0)

crypto/mem.c:123:9: Taking false branch
        121.       void *ret = NULL;
        122.   
        123.       if (num <= 0)
                       ^
        124.           return NULL;
        125.   

crypto/mem.c:126:5: 
        124.           return NULL;
        125.   
        126. >     allow_customize = 0;
        127.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
        128.       if (call_malloc_debug) {

crypto/mem.c:136:5: 
        134.       }
        135.   #else
        136. >     (void)file;
        137.       (void)line;
        138.       ret = malloc(num);

crypto/mem.c:137:5: 
        135.   #else
        136.       (void)file;
        137. >     (void)line;
        138.       ret = malloc(num);
        139.   #endif

crypto/mem.c:138:5: 
        136.       (void)file;
        137.       (void)line;
        138. >     ret = malloc(num);
        139.   #endif
        140.   

crypto/mem.c:153:5: 
        151.   #endif
        152.   
        153. >     return ret;
        154.   }
        155.   

crypto/mem.c:154:1: return from a call to CRYPTO_malloc
        152.   
        153.       return ret;
        154. > }
        155.   
        156.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:160:9: Taking true branch
      158.       void *ret = CRYPTO_malloc(num, file, line);
      159.   
      160.       if (ret != NULL)
                     ^
      161.           memset(ret, 0, num);
      162.       return ret;

crypto/mem.c:161:9: 
      159.   
      160.       if (ret != NULL)
      161. >         memset(ret, 0, num);
      162.       return ret;
      163.   }

crypto/mem.c:162:5: 
      160.       if (ret != NULL)
      161.           memset(ret, 0, num);
      162. >     return ret;
      163.   }
      164.   

crypto/mem.c:163:1: return from a call to CRYPTO_zalloc
      161.           memset(ret, 0, num);
      162.       return ret;
      163. > }
      164.   
      165.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/lhash/lhash.c:118:9: Taking false branch
    116.       if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
    117.           goto err0;
    118.       if ((ret->b = OPENSSL_zalloc(sizeof(*ret->b) * MIN_NODES)) == NULL)
                   ^
    119.           goto err1;
    120.       ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);

crypto/lhash/lhash.c:120:19: Condition is false
    118.       if ((ret->b = OPENSSL_zalloc(sizeof(*ret->b) * MIN_NODES)) == NULL)
    119.           goto err1;
    120.       ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);
                             ^
    121.       ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h);
    122.       ret->num_nodes = MIN_NODES / 2;

crypto/lhash/lhash.c:120:18: 
    118.       if ((ret->b = OPENSSL_zalloc(sizeof(*ret->b) * MIN_NODES)) == NULL)
    119.           goto err1;
    120. >     ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);
    121.       ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h);
    122.       ret->num_nodes = MIN_NODES / 2;

crypto/lhash/lhash.c:120:5: 
    118.       if ((ret->b = OPENSSL_zalloc(sizeof(*ret->b) * MIN_NODES)) == NULL)
    119.           goto err1;
    120. >     ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);
    121.       ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h);
    122.       ret->num_nodes = MIN_NODES / 2;

crypto/lhash/lhash.c:121:19: Condition is false
    119.           goto err1;
    120.       ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);
    121.       ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h);
                             ^
    122.       ret->num_nodes = MIN_NODES / 2;
    123.       ret->num_alloc_nodes = MIN_NODES;

crypto/lhash/lhash.c:121:18: 
    119.           goto err1;
    120.       ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);
    121. >     ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h);
    122.       ret->num_nodes = MIN_NODES / 2;
    123.       ret->num_alloc_nodes = MIN_NODES;

crypto/lhash/lhash.c:121:5: 
    119.           goto err1;
    120.       ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);
    121. >     ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h);
    122.       ret->num_nodes = MIN_NODES / 2;
    123.       ret->num_alloc_nodes = MIN_NODES;

crypto/lhash/lhash.c:122:5: 
    120.       ret->comp = ((c == NULL) ? (LHASH_COMP_FN_TYPE)strcmp : c);
    121.       ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h);
    122. >     ret->num_nodes = MIN_NODES / 2;
    123.       ret->num_alloc_nodes = MIN_NODES;
    124.       ret->pmax = MIN_NODES / 2;

crypto/lhash/lhash.c:123:5: 
    121.       ret->hash = ((h == NULL) ? (LHASH_HASH_FN_TYPE)lh_strhash : h);
    122.       ret->num_nodes = MIN_NODES / 2;
    123. >     ret->num_alloc_nodes = MIN_NODES;
    124.       ret->pmax = MIN_NODES / 2;
    125.       ret->up_load = UP_LOAD;

crypto/lhash/lhash.c:124:5: 
    122.       ret->num_nodes = MIN_NODES / 2;
    123.       ret->num_alloc_nodes = MIN_NODES;
    124. >     ret->pmax = MIN_NODES / 2;
    125.       ret->up_load = UP_LOAD;
    126.       ret->down_load = DOWN_LOAD;

crypto/lhash/lhash.c:125:5: 
    123.       ret->num_alloc_nodes = MIN_NODES;
    124.       ret->pmax = MIN_NODES / 2;
    125. >     ret->up_load = UP_LOAD;
    126.       ret->down_load = DOWN_LOAD;
    127.       return (ret);

crypto/lhash/lhash.c:126:5: 
    124.       ret->pmax = MIN_NODES / 2;
    125.       ret->up_load = UP_LOAD;
    126. >     ret->down_load = DOWN_LOAD;
    127.       return (ret);
    128.   

crypto/lhash/lhash.c:127:5: 
    125.       ret->up_load = UP_LOAD;
    126.       ret->down_load = DOWN_LOAD;
    127. >     return (ret);
    128.   
    129.    err1:

crypto/lhash/lhash.c:133:1: return from a call to lh_new
    131.    err0:
    132.       return (NULL);
    133. > }
    134.   
    135.   void lh_free(_LHASH *lh)

crypto/txt_db/txt_db.c:207:9: Taking false branch
  205.       }
  206.       /* FIXME: we lose type checking at this point */
  207.       if ((idx = (LHASH_OF(OPENSSL_STRING) *)lh_new(hash, cmp)) == NULL) {
                 ^
  208.           db->error = DB_ERROR_MALLOC;
  209.           return (0);

crypto/txt_db/txt_db.c:211:5: 
  209.           return (0);
  210.       }
  211. >     n = sk_OPENSSL_PSTRING_num(db->data);
  212.       for (i = 0; i < n; i++) {
  213.           r = sk_OPENSSL_PSTRING_value(db->data, i);

include/openssl/txt_db.h:79:1: start of procedure sk_OPENSSL_PSTRING_num()
    77.   
    78.   typedef OPENSSL_STRING *OPENSSL_PSTRING;
    79. > DEFINE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING)
    80.   
    81.   typedef struct txt_db_st {

crypto/stack/stack.c:316:1: start of procedure sk_num()
      314.   }
      315.   
      316. > int sk_num(const _STACK *st)
      317.   {
      318.       if (st == NULL)

crypto/stack/stack.c:318:9: Taking true branch
      316.   int sk_num(const _STACK *st)
      317.   {
      318.       if (st == NULL)
                     ^
      319.           return -1;
      320.       return st->num;

crypto/stack/stack.c:319:9: 
      317.   {
      318.       if (st == NULL)
      319. >         return -1;
      320.       return st->num;
      321.   }

crypto/stack/stack.c:321:1: return from a call to sk_num
      319.           return -1;
      320.       return st->num;
      321. > }
      322.   
      323.   void *sk_value(const _STACK *st, int i)

include/openssl/txt_db.h:79:1: return from a call to sk_OPENSSL_PSTRING_num
    77.   
    78.   typedef OPENSSL_STRING *OPENSSL_PSTRING;
    79. > DEFINE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING)
    80.   
    81.   typedef struct txt_db_st {

crypto/txt_db/txt_db.c:212:10: 
  210.       }
  211.       n = sk_OPENSSL_PSTRING_num(db->data);
  212. >     for (i = 0; i < n; i++) {
  213.           r = sk_OPENSSL_PSTRING_value(db->data, i);
  214.           if ((qual != NULL) && (qual(r) == 0))

crypto/txt_db/txt_db.c:212:17: Loop condition is false. Leaving loop
  210.       }
  211.       n = sk_OPENSSL_PSTRING_num(db->data);
  212.       for (i = 0; i < n; i++) {
                         ^
  213.           r = sk_OPENSSL_PSTRING_value(db->data, i);
  214.           if ((qual != NULL) && (qual(r) == 0))

crypto/txt_db/txt_db.c:224:5: 
  222.           }
  223.       }
  224. >     lh_OPENSSL_STRING_free(db->index[field]);
  225.       db->index[field] = idx;
  226.       db->qual[field] = qual;

include/openssl/lhash.h:269:1: start of procedure lh_OPENSSL_STRING_free()
    267.     lh_doall_arg(CHECKED_LHASH_OF(type, lh), fn, CHECKED_PTR_OF(arg_type, arg))
    268.   
    269. > DEFINE_LHASH_OF(OPENSSL_STRING);
    270.   DEFINE_LHASH_OF(OPENSSL_CSTRING);
    271.   

include/openssl/lhash.h:269:1: return from a call to lh_OPENSSL_STRING_free
    267.     lh_doall_arg(CHECKED_LHASH_OF(type, lh), fn, CHECKED_PTR_OF(arg_type, arg))
    268.   
    269. > DEFINE_LHASH_OF(OPENSSL_STRING);
    270.   DEFINE_LHASH_OF(OPENSSL_CSTRING);
    271.   

crypto/txt_db/txt_db.c:225:5: 
  223.       }
  224.       lh_OPENSSL_STRING_free(db->index[field]);
  225. >     db->index[field] = idx;
  226.       db->qual[field] = qual;
  227.       return (1);

crypto/txt_db/txt_db.c:226:5: 
  224.       lh_OPENSSL_STRING_free(db->index[field]);
  225.       db->index[field] = idx;
  226. >     db->qual[field] = qual;
  227.       return (1);
  228.   }

crypto/txt_db/txt_db.c:227:5: 
  225.       db->index[field] = idx;
  226.       db->qual[field] = qual;
  227. >     return (1);
  228.   }
  229.   

crypto/txt_db/txt_db.c:228:1: return from a call to TXT_DB_create_index
  226.       db->qual[field] = qual;
  227.       return (1);
  228. > }
  229.   
  230.   long TXT_DB_write(BIO *out, TXT_DB *db)
