+Fri Mar 24 18:15:41 2006 Ben Pfaff <blp@gnu.org>
+
+ Add some missing frees. Thanks to John Darrington for reporting
+ these.
+
+ * any-writer.c (any_writer_close): Free writer.
+
+ * any-reader.c (any_reader_close): Free reader.
+
Mon Mar 20 16:33:53 2006 Ben Pfaff <blp@gnu.org>
* por-file-reader.c: (error) Mark as NO_RETURN.
bool
any_writer_close (struct any_writer *writer)
{
+ bool ok;
+
if (writer == NULL)
return true;
switch (writer->type)
{
case SYSTEM_FILE:
- return sfm_close_writer (writer->private);
+ ok = sfm_close_writer (writer->private);
+ break;
case PORTABLE_FILE:
- return pfm_close_writer (writer->private);
+ ok = pfm_close_writer (writer->private);
+ break;
case SCRATCH_FILE:
- return scratch_writer_close (writer->private);
-
+ ok = scratch_writer_close (writer->private);
+ break;
+
default:
abort ();
}
+
+ free (writer);
+ return ok;
}