summaryrefslogtreecommitdiff
blob: d0e837993b10680468039fbca0a51d6228be0b69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- wdiff.c	2004-08-16 14:21:05.000000000 +0300
+++ wdiff.c.fixed	2004-08-16 14:22:06.000000000 +0300
@@ -910,7 +910,8 @@
 static void
 complete_input_program (void)
 {
-  fclose (input_file);
+  if (input_file != NULL)
+    fclose (input_file);
   wait (NULL);
 }
 
@@ -1303,6 +1304,7 @@
       initialize_strings ();
       reformat_diff_output ();
       fclose (input_file);
+      input_file = NULL;
     }
 
   /* Clean up.  Beware that input_file and output_file might not exist,