File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -66,19 +66,20 @@ static char temp_config_name[24];
6666static void exit_handler (void )
6767{
6868 // close open files
69- if (file_in != stdin ) {
69+ if (file_in != stdin && file_in != NULL ) {
7070 fclose (file_in );
71- if (file_out != stdout ) {
72- if (ferror (file_out )) {
73- perror ("Error writing to output file" );
74- }
75- fclose (file_out );
76- file_out = NULL ;
77- }
78- if (file_out2 ) {
79- fclose (file_out2 );
80- file_out2 = NULL ;
71+ file_in = NULL ;
72+ }
73+ if (file_out != stdout && file_out != NULL ) {
74+ if (ferror (file_out )) {
75+ perror ("Error writing to output file" );
8176 }
77+ fclose (file_out );
78+ file_out = NULL ;
79+ }
80+ if (file_out2 != NULL ) {
81+ fclose (file_out2 );
82+ file_out2 = NULL ;
8283 }
8384
8485 // 23 February 2015
You can’t perform that action at this time.
0 commit comments