aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-09-06 23:17:50 -0500
committerJack Nagel2013-09-06 23:17:50 -0500
commit3f2736fd833f2c15998ec46cfe7c542babf7cd36 (patch)
tree95e1ed020a617cbcdc97ccc65395b2c7e54a06e3 /Library
parent2113ff16bee9c9c384571ee95b32fa0c96b7f8ca (diff)
downloadhomebrew-3f2736fd833f2c15998ec46cfe7c542babf7cd36.tar.bz2
Fix file descriptor leak in Formula#system
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index fe5ccbe19..0693634f5 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -591,7 +591,7 @@ class Formula
rescue ErrorDuringExecution
raise BuildError.new(self, cmd, args, $?)
ensure
- f.close if f and not f.closed?
+ [rd, f].each { |io| io.close if io and not io.closed? }
ENV.update(removed_ENV_variables) if removed_ENV_variables
end