qprocess: don't leak pid pipe if redirection fails in startDetached()

Change-Id: Ifc42f634964b9412f73f53fb20bd220fcbd9a86c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Oswald Buddenhagen 2018-05-04 14:05:31 +02:00
parent fc9378952b
commit 04ebb981ab

View File

@ -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;