diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-27 07:18:27 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-27 07:18:27 +0000 |
commit | 2fbc63b8a8a7a72bd986a37ab423d4d87f54ae12 (patch) | |
tree | b534ecbe690c705d909f65b9ee7648eab634f063 /io.c | |
parent | bc855ef1391bb79ca3554f67ae2d3aad19178d94 (diff) | |
download | ruby-2fbc63b8a8a7a72bd986a37ab423d4d87f54ae12.tar.gz |
io.c: ARGF fd leak
* io.c (argf_next_argv): fix leak of fd after breaking in #each
method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -8023,6 +8023,7 @@ argf_next_argv(VALUE argf) } if (ARGF.next_p == 1) { + if (ARGF.init_p == 1) argf_close(argf); retry: if (RARRAY_LEN(ARGF.argv) > 0) { VALUE filename = rb_ary_shift(ARGF.argv); |