mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
8bebedc597
commit
fdbf2bb474
2 changed files with 19 additions and 6 deletions
17
ChangeLog
17
ChangeLog
|
|
@ -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 #1916 [ruby-core:24838]; (rb_sysopen): workaround for MSVCRT's bug.
|
||||
* 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
|
||||
|
||||
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>
|
||||
|
|
|
|||
8
io.c
8
io.c
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue