1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* process.c (run_exec_dup2): fix resource leak.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2008-10-09 14:31:32 +00:00
parent ab2868bfba
commit 2f67ef8332
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Thu Oct 9 23:30:47 2008 Yusuke Endoh <mame@tsg.ne.jp>
* process.c (run_exec_dup2): fix resource leak.
Thu Oct 9 23:19:02 2008 Yusuke Endoh <mame@tsg.ne.jp>
* process.c (rb_run_exec_options): fix resource leak.

View file

@ -1854,7 +1854,7 @@ run_exec_dup2(VALUE ary, VALUE save)
int j = i;
while (j != -1 && pairs[j].oldfd != -1 && pairs[j].num_newer == 0) {
if (save_redirect_fd(pairs[j].newfd, save) < 0)
return -1;
goto fail;
ret = redirect_dup2(pairs[j].oldfd, pairs[j].newfd);
if (ret == -1)
goto fail;