--- fports.c.~1.100.2.4.~ 1970-01-01 10:00:01.000000000 +1000 +++ fports.c 2003-09-22 14:51:58.000000000 +1000 @@ -191,9 +191,15 @@ /* silently discards buffered chars. */ if (pt->read_buf != &pt->shortbuf) - scm_must_free (pt->read_buf); + { + scm_must_free (pt->read_buf); + scm_done_free (pt->read_buf_size); + } if (pt->write_buf != &pt->shortbuf) - scm_must_free (pt->write_buf); + { + scm_must_free (pt->write_buf); + scm_done_free (pt->write_buf_size); + } scm_fport_buffer_add (port, csize, csize); return SCM_UNSPECIFIED; @@ -817,10 +823,17 @@ if (pt->read_buf == pt->putback_buf) pt->read_buf = pt->saved_read_buf; if (pt->read_buf != &pt->shortbuf) - scm_must_free (pt->read_buf); + { + scm_must_free (pt->read_buf); + scm_done_free (pt->read_buf_size); + } if (pt->write_buf != &pt->shortbuf) - scm_must_free (pt->write_buf); + { + scm_must_free (pt->write_buf); + scm_done_free (pt->write_buf_size); + } scm_must_free ((char *) fp); + scm_done_free (sizeof (*fp)); return rv; }