--- most-5.0.0a.orig/src/most.c 2007-06-03 00:03:59.000000000 -0400
+++ most-5.0.0a/src/most.c	2010-12-31 04:42:08.000000000 -0500
@@ -321,9 +321,11 @@
 	  {
 	     fprintf (stderr, "fwrite returned %d, errno = %d\n",
 		      m, errno);
+	     (void) fclose (fp);
 	     exit (1);
 	  }
      }
+   (void) fclose (fp);
 }
 
 void most_initialize_most (void)