apps/verify.c:305: error: NULL_DEREFERENCE
  pointer `in` last assigned on line 268 could be null and is dereferenced by call to `BIO_free()` at line 305, column 2.
Showing all 19 steps of the trace


apps/verify.c:264:1: start of procedure load_untrusted()
262.   	}
263.   
264. > static STACK_OF(X509) *load_untrusted(char *certfile)
265.   {
266.   	STACK_OF(X509_INFO) *sk=NULL;

apps/verify.c:266:2: 
264.   static STACK_OF(X509) *load_untrusted(char *certfile)
265.   {
266. > 	STACK_OF(X509_INFO) *sk=NULL;
267.   	STACK_OF(X509) *stack=NULL, *ret=NULL;
268.   	BIO *in=NULL;

apps/verify.c:267:2: 
265.   {
266.   	STACK_OF(X509_INFO) *sk=NULL;
267. > 	STACK_OF(X509) *stack=NULL, *ret=NULL;
268.   	BIO *in=NULL;
269.   	X509_INFO *xi;

apps/verify.c:268:2: 
266.   	STACK_OF(X509_INFO) *sk=NULL;
267.   	STACK_OF(X509) *stack=NULL, *ret=NULL;
268. > 	BIO *in=NULL;
269.   	X509_INFO *xi;
270.   

apps/verify.c:271:7: 
269.   	X509_INFO *xi;
270.   
271. > 	if(!(stack = sk_X509_new_null())) {
272.   		BIO_printf(bio_err,"memory allocation failure\n");
273.   		goto end;

crypto/x509/x509_vfy.c:809:1: start of procedure sk_X509_new_null()
  807.   
  808.   
  809. > IMPLEMENT_STACK_OF(X509)
  810.   IMPLEMENT_ASN1_SET_OF(X509)
  811.   

crypto/x509/x509_vfy.c:809:1: return from a call to sk_X509_new_null
  807.   
  808.   
  809. > IMPLEMENT_STACK_OF(X509)
  810.   IMPLEMENT_ASN1_SET_OF(X509)
  811.   

apps/verify.c:271:7: Taking true branch
269.   	X509_INFO *xi;
270.   
271.   	if(!(stack = sk_X509_new_null())) {
             ^
272.   		BIO_printf(bio_err,"memory allocation failure\n");
273.   		goto end;

apps/verify.c:272:3: Skipping BIO_printf(): empty list of specs
270.   
271.   	if(!(stack = sk_X509_new_null())) {
272.   		BIO_printf(bio_err,"memory allocation failure\n");
         ^
273.   		goto end;
274.   	}

apps/verify.c:304:1: 
302.   	}
303.   	ret=stack;
304. > end:
305.   	BIO_free(in);
306.   	sk_X509_INFO_free(sk);

apps/verify.c:305:2: 
303.   	ret=stack;
304.   end:
305. > 	BIO_free(in);
306.   	sk_X509_INFO_free(sk);
307.   	return(ret);

crypto/bio/bio_lib.c:110:1: start of procedure BIO_free()
  108.   	}
  109.   
  110. > int BIO_free(BIO *a)
  111.   	{
  112.   	int ret=0,i;

crypto/bio/bio_lib.c:112:2: 
  110.   int BIO_free(BIO *a)
  111.   	{
  112. > 	int ret=0,i;
  113.   
  114.   	if (a == NULL) return(0);

crypto/bio/bio_lib.c:114:6: Taking false branch
  112.   	int ret=0,i;
  113.   
  114.   	if (a == NULL) return(0);
              ^
  115.   
  116.   	i=CRYPTO_add(&a->references,-1,CRYPTO_LOCK_BIO);

crypto/bio/bio_lib.c:116:2: 
  114.   	if (a == NULL) return(0);
  115.   
  116. > 	i=CRYPTO_add(&a->references,-1,CRYPTO_LOCK_BIO);
  117.   #ifdef REF_PRINT
  118.   	REF_PRINT("BIO",a);

crypto/cryptlib.c:227:1: start of procedure CRYPTO_add_lock()
    225.   	}
    226.   
    227. > int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,
    228.   	     int line)
    229.   	{

crypto/cryptlib.c:232:6: Taking true branch
    230.   	int ret;
    231.   
    232.   	if (add_lock_callback != NULL)
                ^
    233.   		{
    234.   #ifdef LOCK_DEBUG

crypto/cryptlib.c:238:3: Skipping __function_pointer__(): unresolved function pointer
    236.   #endif
    237.   
    238.   		ret=add_lock_callback(pointer,amount,type,file,line);
             ^
    239.   #ifdef LOCK_DEBUG
    240.   		fprintf(stderr,"ladd:%08lx:%2d+%2d->%2d %-18s %s:%d\n",

crypto/cryptlib.c:246:3: 
    244.   			file,line);
    245.   #endif
    246. > 		*pointer=ret;
    247.   		}
    248.   	else
