apps/smime.c:432: error: MEMORY_LEAK
  memory dynamically allocated by call to `X509_STORE_new()` at line 431, column 15 is not reachable after line 432, column 9.
Showing all 73 steps of the trace


apps/smime.c:427:1: start of procedure setup_verify()
425.   }
426.   
427. > static X509_STORE *setup_verify(char *CAfile, char *CApath)
428.   {
429.   	X509_STORE *store;

apps/smime.c:431:7: 
429.   	X509_STORE *store;
430.   	X509_LOOKUP *lookup;
431. > 	if(!(store = X509_STORE_new())) goto end;
432.   	lookup=X509_STORE_add_lookup(store,X509_LOOKUP_file());
433.   	if (lookup == NULL) goto end;

crypto/x509/x509_lu.c:196:1: start of procedure X509_STORE_new()
  194.   	}
  195.   
  196. > X509_STORE *X509_STORE_new(void)
  197.   	{
  198.   	X509_STORE *ret;

crypto/x509/x509_lu.c:200:6: Taking false branch
  198.   	X509_STORE *ret;
  199.   
  200.   	if ((ret=(X509_STORE *)Malloc(sizeof(X509_STORE))) == NULL)
              ^
  201.   		return(NULL);
  202.   	ret->certs=lh_new(x509_object_hash,x509_object_cmp);

crypto/x509/x509_lu.c:202:2: 
  200.   	if ((ret=(X509_STORE *)Malloc(sizeof(X509_STORE))) == NULL)
  201.   		return(NULL);
  202. > 	ret->certs=lh_new(x509_object_hash,x509_object_cmp);
  203.   	ret->cache=1;
  204.   	ret->get_cert_methods=sk_X509_LOOKUP_new_null();

crypto/lhash/lhash.c:117:1: start of procedure lh_new()
    115.   static LHASH_NODE **getrn(LHASH *lh, char *data, unsigned long *rhash);
    116.   
    117. > LHASH *lh_new(unsigned long (*h)(), int (*c)())
    118.   	{
    119.   	LHASH *ret;

crypto/lhash/lhash.c:122:6: Taking false branch
    120.   	int i;
    121.   
    122.   	if ((ret=(LHASH *)Malloc(sizeof(LHASH))) == NULL)
                ^
    123.   		goto err0;
    124.   	if ((ret->b=(LHASH_NODE **)Malloc(sizeof(LHASH_NODE *)*MIN_NODES)) == NULL)

crypto/lhash/lhash.c:124:6: Taking false branch
    122.   	if ((ret=(LHASH *)Malloc(sizeof(LHASH))) == NULL)
    123.   		goto err0;
    124.   	if ((ret->b=(LHASH_NODE **)Malloc(sizeof(LHASH_NODE *)*MIN_NODES)) == NULL)
                ^
    125.   		goto err1;
    126.   	for (i=0; i<MIN_NODES; i++)

crypto/lhash/lhash.c:126:7: 
    124.   	if ((ret->b=(LHASH_NODE **)Malloc(sizeof(LHASH_NODE *)*MIN_NODES)) == NULL)
    125.   		goto err1;
    126. > 	for (i=0; i<MIN_NODES; i++)
    127.   		ret->b[i]=NULL;
    128.   	ret->comp=((c == NULL)?(int (*)())strcmp:c);

crypto/lhash/lhash.c:126:12: Loop condition is true. Entering loop body
    124.   	if ((ret->b=(LHASH_NODE **)Malloc(sizeof(LHASH_NODE *)*MIN_NODES)) == NULL)
    125.   		goto err1;
    126.   	for (i=0; i<MIN_NODES; i++)
                      ^
    127.   		ret->b[i]=NULL;
    128.   	ret->comp=((c == NULL)?(int (*)())strcmp:c);

crypto/lhash/lhash.c:127:3: 
    125.   		goto err1;
    126.   	for (i=0; i<MIN_NODES; i++)
    127. > 		ret->b[i]=NULL;
    128.   	ret->comp=((c == NULL)?(int (*)())strcmp:c);
    129.   	ret->hash=((h == NULL)?(unsigned long (*)())lh_strhash:h);

crypto/lhash/lhash.c:126:25: 
    124.   	if ((ret->b=(LHASH_NODE **)Malloc(sizeof(LHASH_NODE *)*MIN_NODES)) == NULL)
    125.   		goto err1;
    126. > 	for (i=0; i<MIN_NODES; i++)
    127.   		ret->b[i]=NULL;
    128.   	ret->comp=((c == NULL)?(int (*)())strcmp:c);

crypto/lhash/lhash.c:126:12: Loop condition is false. Leaving loop
    124.   	if ((ret->b=(LHASH_NODE **)Malloc(sizeof(LHASH_NODE *)*MIN_NODES)) == NULL)
    125.   		goto err1;
    126.   	for (i=0; i<MIN_NODES; i++)
                      ^
    127.   		ret->b[i]=NULL;
    128.   	ret->comp=((c == NULL)?(int (*)())strcmp:c);

crypto/lhash/lhash.c:128:14: Condition is false
    126.   	for (i=0; i<MIN_NODES; i++)
    127.   		ret->b[i]=NULL;
    128.   	ret->comp=((c == NULL)?(int (*)())strcmp:c);
                        ^
    129.   	ret->hash=((h == NULL)?(unsigned long (*)())lh_strhash:h);
    130.   	ret->num_nodes=MIN_NODES/2;

crypto/lhash/lhash.c:128:13: 
    126.   	for (i=0; i<MIN_NODES; i++)
    127.   		ret->b[i]=NULL;
    128. > 	ret->comp=((c == NULL)?(int (*)())strcmp:c);
    129.   	ret->hash=((h == NULL)?(unsigned long (*)())lh_strhash:h);
    130.   	ret->num_nodes=MIN_NODES/2;

crypto/lhash/lhash.c:128:2: 
    126.   	for (i=0; i<MIN_NODES; i++)
    127.   		ret->b[i]=NULL;
    128. > 	ret->comp=((c == NULL)?(int (*)())strcmp:c);
    129.   	ret->hash=((h == NULL)?(unsigned long (*)())lh_strhash:h);
    130.   	ret->num_nodes=MIN_NODES/2;

crypto/lhash/lhash.c:129:14: Condition is false
    127.   		ret->b[i]=NULL;
    128.   	ret->comp=((c == NULL)?(int (*)())strcmp:c);
    129.   	ret->hash=((h == NULL)?(unsigned long (*)())lh_strhash:h);
                        ^
    130.   	ret->num_nodes=MIN_NODES/2;
    131.   	ret->num_alloc_nodes=MIN_NODES;

crypto/lhash/lhash.c:129:13: 
    127.   		ret->b[i]=NULL;
    128.   	ret->comp=((c == NULL)?(int (*)())strcmp:c);
    129. > 	ret->hash=((h == NULL)?(unsigned long (*)())lh_strhash:h);
    130.   	ret->num_nodes=MIN_NODES/2;
    131.   	ret->num_alloc_nodes=MIN_NODES;

crypto/lhash/lhash.c:129:2: 
    127.   		ret->b[i]=NULL;
    128.   	ret->comp=((c == NULL)?(int (*)())strcmp:c);
    129. > 	ret->hash=((h == NULL)?(unsigned long (*)())lh_strhash:h);
    130.   	ret->num_nodes=MIN_NODES/2;
    131.   	ret->num_alloc_nodes=MIN_NODES;

crypto/lhash/lhash.c:130:2: 
    128.   	ret->comp=((c == NULL)?(int (*)())strcmp:c);
    129.   	ret->hash=((h == NULL)?(unsigned long (*)())lh_strhash:h);
    130. > 	ret->num_nodes=MIN_NODES/2;
    131.   	ret->num_alloc_nodes=MIN_NODES;
    132.   	ret->p=0;

crypto/lhash/lhash.c:131:2: 
    129.   	ret->hash=((h == NULL)?(unsigned long (*)())lh_strhash:h);
    130.   	ret->num_nodes=MIN_NODES/2;
    131. > 	ret->num_alloc_nodes=MIN_NODES;
    132.   	ret->p=0;
    133.   	ret->pmax=MIN_NODES/2;

crypto/lhash/lhash.c:132:2: 
    130.   	ret->num_nodes=MIN_NODES/2;
    131.   	ret->num_alloc_nodes=MIN_NODES;
    132. > 	ret->p=0;
    133.   	ret->pmax=MIN_NODES/2;
    134.   	ret->up_load=UP_LOAD;

crypto/lhash/lhash.c:133:2: 
    131.   	ret->num_alloc_nodes=MIN_NODES;
    132.   	ret->p=0;
    133. > 	ret->pmax=MIN_NODES/2;
    134.   	ret->up_load=UP_LOAD;
    135.   	ret->down_load=DOWN_LOAD;

crypto/lhash/lhash.c:134:2: 
    132.   	ret->p=0;
    133.   	ret->pmax=MIN_NODES/2;
    134. > 	ret->up_load=UP_LOAD;
    135.   	ret->down_load=DOWN_LOAD;
    136.   	ret->num_items=0;

crypto/lhash/lhash.c:135:2: 
    133.   	ret->pmax=MIN_NODES/2;
    134.   	ret->up_load=UP_LOAD;
    135. > 	ret->down_load=DOWN_LOAD;
    136.   	ret->num_items=0;
    137.   

crypto/lhash/lhash.c:136:2: 
    134.   	ret->up_load=UP_LOAD;
    135.   	ret->down_load=DOWN_LOAD;
    136. > 	ret->num_items=0;
    137.   
    138.   	ret->num_expands=0;

crypto/lhash/lhash.c:138:2: 
    136.   	ret->num_items=0;
    137.   
    138. > 	ret->num_expands=0;
    139.   	ret->num_expand_reallocs=0;
    140.   	ret->num_contracts=0;

crypto/lhash/lhash.c:139:2: 
    137.   
    138.   	ret->num_expands=0;
    139. > 	ret->num_expand_reallocs=0;
    140.   	ret->num_contracts=0;
    141.   	ret->num_contract_reallocs=0;

crypto/lhash/lhash.c:140:2: 
    138.   	ret->num_expands=0;
    139.   	ret->num_expand_reallocs=0;
    140. > 	ret->num_contracts=0;
    141.   	ret->num_contract_reallocs=0;
    142.   	ret->num_hash_calls=0;

crypto/lhash/lhash.c:141:2: 
    139.   	ret->num_expand_reallocs=0;
    140.   	ret->num_contracts=0;
    141. > 	ret->num_contract_reallocs=0;
    142.   	ret->num_hash_calls=0;
    143.   	ret->num_comp_calls=0;

crypto/lhash/lhash.c:142:2: 
    140.   	ret->num_contracts=0;
    141.   	ret->num_contract_reallocs=0;
    142. > 	ret->num_hash_calls=0;
    143.   	ret->num_comp_calls=0;
    144.   	ret->num_insert=0;

crypto/lhash/lhash.c:143:2: 
    141.   	ret->num_contract_reallocs=0;
    142.   	ret->num_hash_calls=0;
    143. > 	ret->num_comp_calls=0;
    144.   	ret->num_insert=0;
    145.   	ret->num_replace=0;

crypto/lhash/lhash.c:144:2: 
    142.   	ret->num_hash_calls=0;
    143.   	ret->num_comp_calls=0;
    144. > 	ret->num_insert=0;
    145.   	ret->num_replace=0;
    146.   	ret->num_delete=0;

crypto/lhash/lhash.c:145:2: 
    143.   	ret->num_comp_calls=0;
    144.   	ret->num_insert=0;
    145. > 	ret->num_replace=0;
    146.   	ret->num_delete=0;
    147.   	ret->num_no_delete=0;

crypto/lhash/lhash.c:146:2: 
    144.   	ret->num_insert=0;
    145.   	ret->num_replace=0;
    146. > 	ret->num_delete=0;
    147.   	ret->num_no_delete=0;
    148.   	ret->num_retrieve=0;

crypto/lhash/lhash.c:147:2: 
    145.   	ret->num_replace=0;
    146.   	ret->num_delete=0;
    147. > 	ret->num_no_delete=0;
    148.   	ret->num_retrieve=0;
    149.   	ret->num_retrieve_miss=0;

crypto/lhash/lhash.c:148:2: 
    146.   	ret->num_delete=0;
    147.   	ret->num_no_delete=0;
    148. > 	ret->num_retrieve=0;
    149.   	ret->num_retrieve_miss=0;
    150.   	ret->num_hash_comps=0;

crypto/lhash/lhash.c:149:2: 
    147.   	ret->num_no_delete=0;
    148.   	ret->num_retrieve=0;
    149. > 	ret->num_retrieve_miss=0;
    150.   	ret->num_hash_comps=0;
    151.   

crypto/lhash/lhash.c:150:2: 
    148.   	ret->num_retrieve=0;
    149.   	ret->num_retrieve_miss=0;
    150. > 	ret->num_hash_comps=0;
    151.   
    152.   	ret->error=0;

crypto/lhash/lhash.c:152:2: 
    150.   	ret->num_hash_comps=0;
    151.   
    152. > 	ret->error=0;
    153.   	return(ret);
    154.   err1:

crypto/lhash/lhash.c:153:2: 
    151.   
    152.   	ret->error=0;
    153. > 	return(ret);
    154.   err1:
    155.   	Free((char *)ret);

crypto/lhash/lhash.c:158:2: return from a call to lh_new
    156.   err0:
    157.   	return(NULL);
    158.   	}
            ^
    159.   
    160.   void lh_free(LHASH *lh)

crypto/x509/x509_lu.c:203:2: 
  201.   		return(NULL);
  202.   	ret->certs=lh_new(x509_object_hash,x509_object_cmp);
  203. > 	ret->cache=1;
  204.   	ret->get_cert_methods=sk_X509_LOOKUP_new_null();
  205.   	ret->verify=NULL;

crypto/x509/x509_lu.c:204:2: 
  202.   	ret->certs=lh_new(x509_object_hash,x509_object_cmp);
  203.   	ret->cache=1;
  204. > 	ret->get_cert_methods=sk_X509_LOOKUP_new_null();
  205.   	ret->verify=NULL;
  206.   	ret->verify_cb=NULL;

crypto/x509/x509_lu.c:427:1: start of procedure sk_X509_LOOKUP_new_null()
    425.   	}
    426.   
    427. > IMPLEMENT_STACK_OF(X509_LOOKUP)

crypto/stack/stack.c:112:1: start of procedure sk_new()
      110.   	}
      111.   
      112. > STACK *sk_new(int (*c)())
      113.   	{
      114.   	STACK *ret;

crypto/stack/stack.c:117:6: Taking false branch
      115.   	int i;
      116.   
      117.   	if ((ret=(STACK *)Malloc(sizeof(STACK))) == NULL)
                  ^
      118.   		goto err0;
      119.   	if ((ret->data=(char **)Malloc(sizeof(char *)*MIN_NODES)) == NULL)

crypto/stack/stack.c:119:6: Taking false branch
      117.   	if ((ret=(STACK *)Malloc(sizeof(STACK))) == NULL)
      118.   		goto err0;
      119.   	if ((ret->data=(char **)Malloc(sizeof(char *)*MIN_NODES)) == NULL)
                  ^
      120.   		goto err1;
      121.   	for (i=0; i<MIN_NODES; i++)

crypto/stack/stack.c:121:7: 
      119.   	if ((ret->data=(char **)Malloc(sizeof(char *)*MIN_NODES)) == NULL)
      120.   		goto err1;
      121. > 	for (i=0; i<MIN_NODES; i++)
      122.   		ret->data[i]=NULL;
      123.   	ret->comp=c;

crypto/stack/stack.c:121:12: Loop condition is true. Entering loop body
      119.   	if ((ret->data=(char **)Malloc(sizeof(char *)*MIN_NODES)) == NULL)
      120.   		goto err1;
      121.   	for (i=0; i<MIN_NODES; i++)
                        ^
      122.   		ret->data[i]=NULL;
      123.   	ret->comp=c;

crypto/stack/stack.c:122:3: 
      120.   		goto err1;
      121.   	for (i=0; i<MIN_NODES; i++)
      122. > 		ret->data[i]=NULL;
      123.   	ret->comp=c;
      124.   	ret->num_alloc=MIN_NODES;

crypto/stack/stack.c:121:25: 
      119.   	if ((ret->data=(char **)Malloc(sizeof(char *)*MIN_NODES)) == NULL)
      120.   		goto err1;
      121. > 	for (i=0; i<MIN_NODES; i++)
      122.   		ret->data[i]=NULL;
      123.   	ret->comp=c;

crypto/stack/stack.c:121:12: Loop condition is false. Leaving loop
      119.   	if ((ret->data=(char **)Malloc(sizeof(char *)*MIN_NODES)) == NULL)
      120.   		goto err1;
      121.   	for (i=0; i<MIN_NODES; i++)
                        ^
      122.   		ret->data[i]=NULL;
      123.   	ret->comp=c;

crypto/stack/stack.c:123:2: 
      121.   	for (i=0; i<MIN_NODES; i++)
      122.   		ret->data[i]=NULL;
      123. > 	ret->comp=c;
      124.   	ret->num_alloc=MIN_NODES;
      125.   	ret->num=0;

crypto/stack/stack.c:124:2: 
      122.   		ret->data[i]=NULL;
      123.   	ret->comp=c;
      124. > 	ret->num_alloc=MIN_NODES;
      125.   	ret->num=0;
      126.   	ret->sorted=0;

crypto/stack/stack.c:125:2: 
      123.   	ret->comp=c;
      124.   	ret->num_alloc=MIN_NODES;
      125. > 	ret->num=0;
      126.   	ret->sorted=0;
      127.   	return(ret);

crypto/stack/stack.c:126:2: 
      124.   	ret->num_alloc=MIN_NODES;
      125.   	ret->num=0;
      126. > 	ret->sorted=0;
      127.   	return(ret);
      128.   err1:

crypto/stack/stack.c:127:2: 
      125.   	ret->num=0;
      126.   	ret->sorted=0;
      127. > 	return(ret);
      128.   err1:
      129.   	Free((char *)ret);

crypto/stack/stack.c:132:2: return from a call to sk_new
      130.   err0:
      131.   	return(NULL);
      132.   	}
              ^
      133.   
      134.   int sk_insert(STACK *st, char *data, int loc)

crypto/x509/x509_lu.c:427:1: return from a call to sk_X509_LOOKUP_new_null
    425.   	}
    426.   
    427. > IMPLEMENT_STACK_OF(X509_LOOKUP)

crypto/x509/x509_lu.c:205:2: 
  203.   	ret->cache=1;
  204.   	ret->get_cert_methods=sk_X509_LOOKUP_new_null();
  205. > 	ret->verify=NULL;
  206.   	ret->verify_cb=NULL;
  207.   	memset(&ret->ex_data,0,sizeof(CRYPTO_EX_DATA));

crypto/x509/x509_lu.c:206:2: 
  204.   	ret->get_cert_methods=sk_X509_LOOKUP_new_null();
  205.   	ret->verify=NULL;
  206. > 	ret->verify_cb=NULL;
  207.   	memset(&ret->ex_data,0,sizeof(CRYPTO_EX_DATA));
  208.   	ret->references=1;

crypto/x509/x509_lu.c:207:2: 
  205.   	ret->verify=NULL;
  206.   	ret->verify_cb=NULL;
  207. > 	memset(&ret->ex_data,0,sizeof(CRYPTO_EX_DATA));
  208.   	ret->references=1;
  209.   	ret->depth=0;

crypto/x509/x509_lu.c:208:2: 
  206.   	ret->verify_cb=NULL;
  207.   	memset(&ret->ex_data,0,sizeof(CRYPTO_EX_DATA));
  208. > 	ret->references=1;
  209.   	ret->depth=0;
  210.   	return(ret);

crypto/x509/x509_lu.c:209:2: 
  207.   	memset(&ret->ex_data,0,sizeof(CRYPTO_EX_DATA));
  208.   	ret->references=1;
  209. > 	ret->depth=0;
  210.   	return(ret);
  211.   	}

crypto/x509/x509_lu.c:210:2: 
  208.   	ret->references=1;
  209.   	ret->depth=0;
  210. > 	return(ret);
  211.   	}
  212.   

crypto/x509/x509_lu.c:211:2: return from a call to X509_STORE_new
  209.   	ret->depth=0;
  210.   	return(ret);
  211.   	}
          ^
  212.   
  213.   static void cleanup(X509_OBJECT *a)

apps/smime.c:431:7: Taking false branch
429.   	X509_STORE *store;
430.   	X509_LOOKUP *lookup;
431.   	if(!(store = X509_STORE_new())) goto end;
             ^
432.   	lookup=X509_STORE_add_lookup(store,X509_LOOKUP_file());
433.   	if (lookup == NULL) goto end;

apps/smime.c:432:2: 
430.   	X509_LOOKUP *lookup;
431.   	if(!(store = X509_STORE_new())) goto end;
432. > 	lookup=X509_STORE_add_lookup(store,X509_LOOKUP_file());
433.   	if (lookup == NULL) goto end;
434.   	if (CAfile) {

crypto/x509/by_file.c:87:1: start of procedure X509_LOOKUP_file()
  85.   	};
  86.   
  87. > X509_LOOKUP_METHOD *X509_LOOKUP_file(void)
  88.   	{
  89.   	return(&x509_file_lookup);

crypto/x509/by_file.c:89:2: 
  87.   X509_LOOKUP_METHOD *X509_LOOKUP_file(void)
  88.   	{
  89. > 	return(&x509_file_lookup);
  90.   	}
  91.   

crypto/x509/by_file.c:90:2: return from a call to X509_LOOKUP_file
  88.   	{
  89.   	return(&x509_file_lookup);
  90.   	}
         ^
  91.   
  92.   static int by_file_ctrl(X509_LOOKUP *ctx, int cmd, const char *argp, long argl,

apps/smime.c:432:2: Skipping X509_STORE_add_lookup(): empty list of specs
430.   	X509_LOOKUP *lookup;
431.   	if(!(store = X509_STORE_new())) goto end;
432.   	lookup=X509_STORE_add_lookup(store,X509_LOOKUP_file());
        ^
433.   	if (lookup == NULL) goto end;
434.   	if (CAfile) {

static X509_STORE *setup_verify(char *CAfile, char *CApath)
{
	X509_STORE *store;
	X509_LOOKUP *lookup;
	if(!(store = X509_STORE_new())) goto end;
	lookup=X509_STORE_add_lookup(store,X509_LOOKUP_file());
	if (lookup == NULL) goto end;
	if (CAfile) {
		if(!X509_LOOKUP_load_file(lookup,CAfile,X509_FILETYPE_PEM)) {
			BIO_printf(bio_err, "Error loading file %s\n", CAfile);
			goto end;
		}
	} else X509_LOOKUP_load_file(lookup,NULL,X509_FILETYPE_DEFAULT);
	lookup=X509_STORE_add_lookup(store,X509_LOOKUP_hash_dir());
	if (lookup == NULL) goto end;
	if (CApath) {
		if(!X509_LOOKUP_add_dir(lookup,CApath,X509_FILETYPE_PEM)) {
			BIO_printf(bio_err, "Error loading directory %s\n", CApath);
			goto end;
		}
	} else X509_LOOKUP_add_dir(lookup,NULL,X509_FILETYPE_DEFAULT);
	ERR_clear_error();
	return store;
	end:
	X509_STORE_free(store);
	return NULL;
}
['static X509_STORE *setup_verify(char *CAfile, char *CApath)\n{\n\tX509_STORE *store;\n\tX509_LOOKUP *lookup;\n\tif(!(store = X509_STORE_new())) goto end;\n\tlookup=X509_STORE_add_lookup(store,X509_LOOKUP_file());\n\tif (lookup == NULL) goto end;\n\tif (CAfile) {\n\t\tif(!X509_LOOKUP_load_file(lookup,CAfile,X509_FILETYPE_PEM)) {\n\t\t\tBIO_printf(bio_err, "Error loading file %s\\n", CAfile);\n\t\t\tgoto end;\n\t\t}\n\t} else X509_LOOKUP_load_file(lookup,NULL,X509_FILETYPE_DEFAULT);\n\tlookup=X509_STORE_add_lookup(store,X509_LOOKUP_hash_dir());\n\tif (lookup == NULL) goto end;\n\tif (CApath) {\n\t\tif(!X509_LOOKUP_add_dir(lookup,CApath,X509_FILETYPE_PEM)) {\n\t\t\tBIO_printf(bio_err, "Error loading directory %s\\n", CApath);\n\t\t\tgoto end;\n\t\t}\n\t} else X509_LOOKUP_add_dir(lookup,NULL,X509_FILETYPE_DEFAULT);\n\tERR_clear_error();\n\treturn store;\n\tend:\n\tX509_STORE_free(store);\n\treturn NULL;\n}', 'X509_STORE *X509_STORE_new(void)\n\t{\n\tX509_STORE *ret;\n\tif ((ret=(X509_STORE *)Malloc(sizeof(X509_STORE))) == NULL)\n\t\treturn(NULL);\n\tret->certs=lh_new(x509_object_hash,x509_object_cmp);\n\tret->cache=1;\n\tret->get_cert_methods=sk_X509_LOOKUP_new_null();\n\tret->verify=NULL;\n\tret->verify_cb=NULL;\n\tmemset(&ret->ex_data,0,sizeof(CRYPTO_EX_DATA));\n\tret->references=1;\n\tret->depth=0;\n\treturn(ret);\n\t}', 'LHASH *lh_new(unsigned long (*h)(), int (*c)())\n\t{\n\tLHASH *ret;\n\tint i;\n\tif ((ret=(LHASH *)Malloc(sizeof(LHASH))) == NULL)\n\t\tgoto err0;\n\tif ((ret->b=(LHASH_NODE **)Malloc(sizeof(LHASH_NODE *)*MIN_NODES)) == NULL)\n\t\tgoto err1;\n\tfor (i=0; i<MIN_NODES; i++)\n\t\tret->b[i]=NULL;\n\tret->comp=((c == NULL)?(int (*)())strcmp:c);\n\tret->hash=((h == NULL)?(unsigned long (*)())lh_strhash:h);\n\tret->num_nodes=MIN_NODES/2;\n\tret->num_alloc_nodes=MIN_NODES;\n\tret->p=0;\n\tret->pmax=MIN_NODES/2;\n\tret->up_load=UP_LOAD;\n\tret->down_load=DOWN_LOAD;\n\tret->num_items=0;\n\tret->num_expands=0;\n\tret->num_expand_reallocs=0;\n\tret->num_contracts=0;\n\tret->num_contract_reallocs=0;\n\tret->num_hash_calls=0;\n\tret->num_comp_calls=0;\n\tret->num_insert=0;\n\tret->num_replace=0;\n\tret->num_delete=0;\n\tret->num_no_delete=0;\n\tret->num_retrieve=0;\n\tret->num_retrieve_miss=0;\n\tret->num_hash_comps=0;\n\tret->error=0;\n\treturn(ret);\nerr1:\n\tFree((char *)ret);\nerr0:\n\treturn(NULL);\n\t}', 'IMPLEMENT_STACK_OF(X509_LOOKUP)', 'STACK *sk_new(int (*c)())\n\t{\n\tSTACK *ret;\n\tint i;\n\tif ((ret=(STACK *)Malloc(sizeof(STACK))) == NULL)\n\t\tgoto err0;\n\tif ((ret->data=(char **)Malloc(sizeof(char *)*MIN_NODES)) == NULL)\n\t\tgoto err1;\n\tfor (i=0; i<MIN_NODES; i++)\n\t\tret->data[i]=NULL;\n\tret->comp=c;\n\tret->num_alloc=MIN_NODES;\n\tret->num=0;\n\tret->sorted=0;\n\treturn(ret);\nerr1:\n\tFree((char *)ret);\nerr0:\n\treturn(NULL);\n\t}', 'X509_LOOKUP_METHOD *X509_LOOKUP_file(void)\n\t{\n\treturn(&x509_file_lookup);\n\t}']