crypto/bio/bss_file.c:110: error: RESOURCE_LEAK
  resource of type `_IO_FILE` acquired to `return` by call to `fopen()` at line 102, column 12 is not released after line 110, column 3.
Showing all 33 steps of the trace


crypto/bio/bss_file.c:97:1: start of procedure BIO_new_file()
95.   	};
96.   
97. > BIO *BIO_new_file(const char *filename, const char *mode)
98.   	{
99.   	BIO *ret;

crypto/bio/bss_file.c:102:6: Taking false branch
100.   	FILE *file;
101.   
102.   	if ((file=fopen(filename,mode)) == NULL)
            ^
103.   		{
104.   		SYSerr(SYS_F_FOPEN,get_last_sys_error());

crypto/bio/bss_file.c:109:6: 
107.   		return(NULL);
108.   		}
109. > 	if ((ret=BIO_new(BIO_s_file_internal())) == NULL)
110.   		return(NULL);
111.   

crypto/bio/bss_file.c:127:1: start of procedure BIO_s_file()
  125.   	}
  126.   
  127. > BIO_METHOD *BIO_s_file(void)
  128.   	{
  129.   	return(&methods_filep);

crypto/bio/bss_file.c:129:2: 
  127.   BIO_METHOD *BIO_s_file(void)
  128.   	{
  129. > 	return(&methods_filep);
  130.   	}
  131.   

crypto/bio/bss_file.c:130:2: return from a call to BIO_s_file
  128.   	{
  129.   	return(&methods_filep);
  130.   	}
          ^
  131.   
  132.   static int MS_CALLBACK file_new(BIO *bi)

crypto/bio/bio_lib.c:69:1: start of procedure BIO_new()
  67.   static int bio_meth_num=0;
  68.   
  69. > BIO *BIO_new(BIO_METHOD *method)
  70.   	{
  71.   	BIO *ret=NULL;

crypto/bio/bio_lib.c:71:2: 
  69.   BIO *BIO_new(BIO_METHOD *method)
  70.   	{
  71. > 	BIO *ret=NULL;
  72.   
  73.   	ret=(BIO *)OPENSSL_malloc(sizeof(BIO));

crypto/bio/bio_lib.c:73:2: 
  71.   	BIO *ret=NULL;
  72.   
  73. > 	ret=(BIO *)OPENSSL_malloc(sizeof(BIO));
  74.   	if (ret == NULL)
  75.   		{

crypto/mem.c:205:1: start of procedure CRYPTO_malloc()
    203.   	}
    204.   
    205. > void *CRYPTO_malloc(int num, const char *file, int line)
    206.   	{
    207.   	void *ret = NULL;

crypto/mem.c:207:2: 
    205.   void *CRYPTO_malloc(int num, const char *file, int line)
    206.   	{
    207. > 	void *ret = NULL;
    208.   
    209.   	allow_customize = 0;

crypto/mem.c:209:2: 
    207.   	void *ret = NULL;
    208.   
    209. > 	allow_customize = 0;
    210.   	if (malloc_debug_func != NULL)
    211.   		{

crypto/mem.c:210:6: Taking false branch
    208.   
    209.   	allow_customize = 0;
    210.   	if (malloc_debug_func != NULL)
                ^
    211.   		{
    212.   		allow_customize_debug = 0;

crypto/mem.c:215:2: Skipping __function_pointer__(): unresolved function pointer
    213.   		malloc_debug_func(NULL, num, file, line, 0);
    214.   		}
    215.   	ret = malloc_func(num);
            ^
    216.   #ifdef LEVITTE_DEBUG_MEM
    217.   	fprintf(stderr, "LEVITTE_DEBUG_MEM:         > 0x%p (%d)\n", ret, num);

crypto/mem.c:219:6: Taking false branch
    217.   	fprintf(stderr, "LEVITTE_DEBUG_MEM:         > 0x%p (%d)\n", ret, num);
    218.   #endif
    219.   	if (malloc_debug_func != NULL)
                ^
    220.   		malloc_debug_func(ret, num, file, line, 1);
    221.   

crypto/mem.c:222:2: 
    220.   		malloc_debug_func(ret, num, file, line, 1);
    221.   
    222. > 	return ret;
    223.   	}
    224.   

crypto/mem.c:223:2: return from a call to CRYPTO_malloc
    221.   
    222.   	return ret;
    223.   	}
            ^
    224.   
    225.   void *CRYPTO_realloc(void *str, int num, const char *file, int line)

crypto/bio/bio_lib.c:74:6: Taking true branch
  72.   
  73.   	ret=(BIO *)OPENSSL_malloc(sizeof(BIO));
  74.   	if (ret == NULL)
             ^
  75.   		{
  76.   		BIOerr(BIO_F_BIO_NEW,ERR_R_MALLOC_FAILURE);

crypto/bio/bio_lib.c:76:3: 
  74.   	if (ret == NULL)
  75.   		{
  76. > 		BIOerr(BIO_F_BIO_NEW,ERR_R_MALLOC_FAILURE);
  77.   		return(NULL);
  78.   		}

crypto/err/err.c:360:1: start of procedure ERR_put_error()
    358.   /********************************************************/
    359.   
    360. > void ERR_put_error(int lib, int func, int reason, const char *file,
    361.   	     int line)
    362.   	{

crypto/err/err.c:384:2: Skipping ERR_get_state(): empty list of specs
    382.   	}
    383.   #endif
    384.   	es=ERR_get_state();
            ^
    385.   
    386.   	es->top=(es->top+1)%ERR_NUM_ERRORS;

crypto/err/err.c:386:2: 
    384.   	es=ERR_get_state();
    385.   
    386. > 	es->top=(es->top+1)%ERR_NUM_ERRORS;
    387.   	if (es->top == es->bottom)
    388.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;

crypto/err/err.c:387:6: Taking false branch
    385.   
    386.   	es->top=(es->top+1)%ERR_NUM_ERRORS;
    387.   	if (es->top == es->bottom)
                ^
    388.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
    389.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);

crypto/err/err.c:389:2: 
    387.   	if (es->top == es->bottom)
    388.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
    389. > 	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
    390.   	es->err_file[es->top]=file;
    391.   	es->err_line[es->top]=line;

crypto/err/err.c:390:2: 
    388.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
    389.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
    390. > 	es->err_file[es->top]=file;
    391.   	es->err_line[es->top]=line;
    392.   	err_clear_data(es,es->top);

crypto/err/err.c:391:2: 
    389.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
    390.   	es->err_file[es->top]=file;
    391. > 	es->err_line[es->top]=line;
    392.   	err_clear_data(es,es->top);
    393.   	}

crypto/err/err.c:392:2: Taking true branch
    390.   	es->err_file[es->top]=file;
    391.   	es->err_line[es->top]=line;
    392.   	err_clear_data(es,es->top);
            ^
    393.   	}
    394.   

crypto/err/err.c:392:2: Taking false branch
    390.   	es->err_file[es->top]=file;
    391.   	es->err_line[es->top]=line;
    392.   	err_clear_data(es,es->top);
            ^
    393.   	}
    394.   

crypto/err/err.c:393:2: return from a call to ERR_put_error
    391.   	es->err_line[es->top]=line;
    392.   	err_clear_data(es,es->top);
    393.   	}
            ^
    394.   
    395.   void ERR_clear_error(void)

crypto/bio/bio_lib.c:77:3: 
  75.   		{
  76.   		BIOerr(BIO_F_BIO_NEW,ERR_R_MALLOC_FAILURE);
  77. > 		return(NULL);
  78.   		}
  79.   	if (!BIO_set(ret,method))

crypto/bio/bio_lib.c:85:2: return from a call to BIO_new
  83.   		}
  84.   	return(ret);
  85.   	}
         ^
  86.   
  87.   int BIO_set(BIO *bio, BIO_METHOD *method)

crypto/bio/bss_file.c:109:6: Taking true branch
107.   		return(NULL);
108.   		}
109.   	if ((ret=BIO_new(BIO_s_file_internal())) == NULL)
            ^
110.   		return(NULL);
111.   

crypto/bio/bss_file.c:110:3: 
108.   		}
109.   	if ((ret=BIO_new(BIO_s_file_internal())) == NULL)
110. > 		return(NULL);
111.   
112.   	BIO_set_fp(ret,file,BIO_CLOSE);
