diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-05-04 14:05:31 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-05-30 10:58:01 +0000 |
commit | 04ebb981ab911fe527deb5b247fdc9392d9be535 (patch) | |
tree | aba66aad45007cc6c2fe18b5f3d9f38038c38576 /src/corelib/io/qprocess_unix.cpp | |
parent | fc9378952bf4d5ecb7adc55c36083763761b0fb9 (diff) |
qprocess: don't leak pid pipe if redirection fails in startDetached()
Change-Id: Ifc42f634964b9412f73f53fb20bd220fcbd9a86c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qprocess_unix.cpp')
-rw-r--r-- | src/corelib/io/qprocess_unix.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp index 68b7a8bf9b..a849519635 100644 --- a/src/corelib/io/qprocess_unix.cpp +++ b/src/corelib/io/qprocess_unix.cpp @@ -925,6 +925,8 @@ bool QProcessPrivate::startDetached(qint64 *pid) closeChannel(&stdinChannel); closeChannel(&stdoutChannel); closeChannel(&stderrChannel); + qt_safe_close(pidPipe[0]); + qt_safe_close(pidPipe[1]); qt_safe_close(startedPipe[0]); qt_safe_close(startedPipe[1]); return false; |