From aeaf4921576d3a52a46cb3f3a90d1563311cacd4 Mon Sep 17 00:00:00 2001 From: Ezo Date: Fri, 22 Nov 2013 19:06:01 +0000 Subject: [PATCH] Terminal: Fixed resource leak CID:702031 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Duval --- src/apps/terminal/Shell.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/apps/terminal/Shell.cpp b/src/apps/terminal/Shell.cpp index ebfe8f270d..9fdd2de818 100644 --- a/src/apps/terminal/Shell.cpp +++ b/src/apps/terminal/Shell.cpp @@ -615,11 +615,12 @@ Shell::_Spawn(int row, int col, const ShellParameters& parameters) } } - if (done <= 0) + if (done <= 0) { + close(master); return B_ERROR; + } fFd = master; return B_OK; } -