Skip to content

Commit abe89a5

Browse files
committed
[core/process] Fix fd leak after redirection failure.
1 parent 77e3af8 commit abe89a5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/process.py

+1
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ def Push(self, redirects, waiter):
441441
try:
442442
self._ApplyRedirect(r, waiter)
443443
except (IOError, OSError) as e:
444+
self.Pop()
444445
return False # for bad descriptor, etc.
445446
finally:
446447
self.errfmt.PopLocation()

0 commit comments

Comments
 (0)