From a1f165c02df7c046f9fb62e7655a373ebe4516fa Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 6 Sep 2013 23:17:50 -0500 Subject: Fix file descriptor leak in Formula#system --- Library/Homebrew/formula.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library') 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 -- cgit v1.2.3