diff options
author | wyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-27 19:01:31 +0000 |
---|---|---|
committer | wyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-27 19:01:31 +0000 |
commit | fdbf2bb474d7c1922fb66d433de21bfa99b2d471 (patch) | |
tree | 91a811eee82a4c6feef2d230d06d0129a96b76f5 | |
parent | 8bebedc59761f4ca767e1a2d7db20758f279bf90 (diff) |
Backport #2009 [ruby-core:25173]; (rb_io_fptr_finalize): free fptr to avoid memory leaks.
My brain got stuck in a bad pattern, and I kept adding new items under the first record for the day. They are all broken out into their own entries like they should be, now, with timestamps pulled from the SVN log.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@26457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | io.c | 8 |
2 files changed, 19 insertions, 6 deletions
@@ -1,12 +1,25 @@ -Wed Jan 27 22:16:00 2010 Kirk Haines <khaines@ruby-lang.org> +Wed Jan 28 04:00:00 2010 Kirk Haines <khaines@ruby-lang.org> + + * io.c: Backport #2009 [ruby-core:25173]; (rb_io_fptr_finalize): free fptr to avoid memory leaks. + + * ChangeLog: My brain got stuck in a bad pattern, and I kept adding new items under the first record for the day. They are all broken out into their own entries like they should be, now, with timestamps pulled from the SVN log. + +Thu Jan 28 03:18:10 2010 Kirk Haines <khaines@ruby-lang.org> + + * io.c: Backport #1916 [ruby-core:24838]; (rb_sysopen): workaround for MSVCRT's bug. r26455 - * io.c: Backport #1916 [ruby-core:24838]; (rb_sysopen): workaround for MSVCRT's bug. +Wed Jan 27 23:58:36 2010 Kirk Haines <khaines@ruby-lang.org> * re.h: Backport #1875 [ruby-core:24735]; (RMATCH_REGS): added for compatibility. r26452 ruby.h: (RFLOAT_VALUE, RSTRING_END, RREGEXP_SRC_*, RBIGNUM_*): backported macros for compatiblity from trunk. r26452 + +Wed Jan 27 23:36:38 2010 Kirk Haines <khaines@ruby-lang.org> + * io.c: Backport #1818 [ruby-core:24561]; (argf_eof): go to the next file if called after ARGF.close or ARGF.skip. r26451 +Wed Jan 27 22:16:00 2010 Kirk Haines <khaines@ruby-lang.org> + * lib/rexml/text.rb: Backport #1806 [ruby-core:24506]; (REXML::Text.normalize): call to_s for input. r26442 Tue Jan 26 3:03:00 2010 Kirk Haines <khaines@ruby-lang.org> @@ -2230,10 +2230,10 @@ rb_io_fptr_finalize(fptr) if (fptr->path) { free(fptr->path); } - if (!fptr->f && !fptr->f2) return; - if (fileno(fptr->f) < 3) return; - - rb_io_fptr_cleanup(fptr, Qtrue); + if ((fptr->f && fileno(fptr->f) > 2) || fptr->f2) { + rb_io_fptr_cleanup(fptr, Qtrue); + } + xfree(fptr); } VALUE |