diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | process.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -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. @@ -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; |