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


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

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

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

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

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

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

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

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

BIO *BIO_new_file(const char *filename, const char *mode)
	{
	BIO *ret;
	FILE *file;
	if ((file=fopen(filename,mode)) == NULL)
		{
		SYSerr(SYS_F_FOPEN,get_last_sys_error());
		ERR_add_error_data(5,"fopen('",filename,"','",mode,"')");
		BIOerr(BIO_F_BIO_NEW_FILE,ERR_R_SYS_LIB);
		return(NULL);
		}
	if ((ret=BIO_new(BIO_s_file_internal())) == NULL)
		return(NULL);
	BIO_set_fp(ret,file,BIO_CLOSE);
	return(ret);
	}
['BIO *BIO_new_file(const char *filename, const char *mode)\n\t{\n\tBIO *ret;\n\tFILE *file;\n\tif ((file=fopen(filename,mode)) == NULL)\n\t\t{\n\t\tSYSerr(SYS_F_FOPEN,get_last_sys_error());\n\t\tERR_add_error_data(5,"fopen(\'",filename,"\',\'",mode,"\')");\n\t\tBIOerr(BIO_F_BIO_NEW_FILE,ERR_R_SYS_LIB);\n\t\treturn(NULL);\n\t\t}\n\tif ((ret=BIO_new(BIO_s_file_internal())) == NULL)\n\t\treturn(NULL);\n\tBIO_set_fp(ret,file,BIO_CLOSE);\n\treturn(ret);\n\t}', 'BIO_METHOD *BIO_s_file(void)\n\t{\n\treturn(&methods_filep);\n\t}']