Fix a memory leak in scm_read_line and a type cast bug in the ptob.
authorTim Pierce <twp@skepsis.com>
Thu, 27 Nov 1997 06:39:46 +0000 (06:39 +0000)
committerTim Pierce <twp@skepsis.com>
Thu, 27 Nov 1997 06:39:46 +0000 (06:39 +0000)
commit3e2043c4ddfef4c1d4a225c12171f494a04317be
tree536dd2457dacb6992704331a456fa7d97419bb49
parent2c92112b3d4a84229e3d8cc080af86feb23f5611
Fix a memory leak in scm_read_line and a type cast bug in the ptob.
* fports.c (scm_fgets): Use malloc/free rather than scm_must_malloc
  and scm_must_free, since ultimately the string returned will be copied
  by scm_makfrom0str anyway.  Also, read any characters that may have
been pushed onto the port with scm_ungetc.
* ports.c (scm_generic_fgets): Same as for scm_fgets.
* ioext.c (scm_read_line): Free string after Guilifying it.
* ports.h (scm_ptobfuns): fgets method returns a char *, not a char.
libguile/ChangeLog
libguile/fports.c
libguile/ioext.c
libguile/ports.c
libguile/ports.h