Skip to content

Commit

Permalink
qprocess: don't leak pid pipe if redirection fails in startDetached()
Browse files Browse the repository at this point in the history
Change-Id: Ifc42f634964b9412f73f53fb20bd220fcbd9a86c
Reviewed-by: Thiago Macieira <[email protected]>
  • Loading branch information
ossilator committed May 30, 2018
1 parent fc93789 commit 04ebb98
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/corelib/io/qprocess_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 04ebb98

Please sign in to comment.