QLocalSocket/Win: fix possible UB in _q_pipeClosed()
We must stop the pipe writer before closing the handle on which it operates. Pick-to: 5.15 6.0 6.1 Change-Id: I4765dd8393167fe2453653aba76a097b8ace8e3d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
This commit is contained in:
parent
97877d7948
commit
64f02ebf05
@ -260,13 +260,10 @@ void QLocalSocketPrivate::_q_pipeClosed()
|
|||||||
emit q->disconnected();
|
emit q->disconnected();
|
||||||
|
|
||||||
pipeReader->stop();
|
pipeReader->stop();
|
||||||
|
delete pipeWriter;
|
||||||
|
pipeWriter = nullptr;
|
||||||
destroyPipeHandles();
|
destroyPipeHandles();
|
||||||
handle = INVALID_HANDLE_VALUE;
|
handle = INVALID_HANDLE_VALUE;
|
||||||
|
|
||||||
if (pipeWriter) {
|
|
||||||
delete pipeWriter;
|
|
||||||
pipeWriter = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
qint64 QLocalSocket::bytesAvailable() const
|
qint64 QLocalSocket::bytesAvailable() const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user