+Sun Jan 23 23:02:21 2005 Ben Pfaff <blp@gnu.org>
+
+ * print.c: (print_trns_free) Close the dfm writer if there is one,
+ fixing a memory leak.
+
Mon Jan 24 12:24:36 WST 2005 John Darrington <john@darrington.wattle.id.au>
* glob.c oneway.q q2c.c t-test.q vfm.c: Still *more* memory leaks
static void
print_trns_free (struct trns_header * t)
{
+ struct print_trns *prt = (struct print_trns *) t;
struct prt_out_spec *i, *n;
- for (i = ((struct print_trns *) t)->spec; i; i = n)
+ for (i = prt->spec; i; i = n)
{
switch (i->type)
{
n = i->next;
free (i);
}
- free (((struct print_trns *) t)->line);
+ if (prt->writer != NULL)
+ dfm_close_writer (prt->writer);
+ free (prt->line);
}
\f
/* PRINT SPACE. */