Mercurial > hg > octave-nkf
changeset 5308:bc8d6ebb6ee1
[project @ 2005-04-27 05:08:19 by jwe]
author | jwe |
---|---|
date | Wed, 27 Apr 2005 05:08:19 +0000 |
parents | 4c8a2e4e0717 |
children | 15031c6fab31 |
files | src/ChangeLog src/comment-list.cc src/parse.y |
diffstat | 3 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-04-27 John W. Eaton <jwe@octave.org> + + * parse.y: (safe_fclose): Delete comment list to avoid memory leak. + 2005-04-26 John W. Eaton <jwe@octave.org> * mkbuiltins (VAR_FILES): Expect $(VAR_FILES) to have .df suffix.
--- a/src/comment-list.cc +++ b/src/comment-list.cc @@ -58,7 +58,6 @@ instance->do_append (s, t); } - octave_comment_list * octave_comment_buffer::get_comment (void) {
--- a/src/parse.y +++ b/src/parse.y @@ -2919,7 +2919,9 @@ // statement, possibly from the command line or another file, which // can be quite confusing). - octave_comment_buffer::get_comment (); + octave_comment_list *tc = octave_comment_buffer::get_comment (); + + delete tc; if (f) fclose (static_cast<FILE *> (f));