From 04ebb981ab911fe527deb5b247fdc9392d9be535 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 4 May 2018 14:05:31 +0200 Subject: qprocess: don't leak pid pipe if redirection fails in startDetached() Change-Id: Ifc42f634964b9412f73f53fb20bd220fcbd9a86c Reviewed-by: Thiago Macieira --- src/corelib/io/qprocess_unix.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/corelib/io/qprocess_unix.cpp') 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; -- cgit v1.2.3