Ticket #10229: 0001-Fixed-resource-leak-CID-702031.3.patch

File 0001-Fixed-resource-leak-CID-702031.3.patch, 678 bytes (added by Ezodev, 10 years ago)
  • src/apps/terminal/Shell.cpp

    From 0b8d18d81a3217e099b3ff118ae449e86cadaf65 Mon Sep 17 00:00:00 2001
    From: Ezo <ezo.dev@gmail.com>
    Date: Fri, 22 Nov 2013 19:06:01 +0000
    Subject: [PATCH] Fixed resource leak CID:702031
    
    ---
     src/apps/terminal/Shell.cpp | 6 ++++--
     1 file changed, 4 insertions(+), 2 deletions(-)
    
    diff --git a/src/apps/terminal/Shell.cpp b/src/apps/terminal/Shell.cpp
    index ebfe8f2..2d96c14 100644
    a b Shell::_Spawn(int row, int col, const ShellParameters& parameters)  
    615615        }
    616616    }
    617617
    618     if (done <= 0)
     618    if (done <= 0) {
     619        close(master);
    619620        return B_ERROR;
    620 
     621    }
     622   
    621623    fFd = master;
    622624
    623625    return B_OK;