IPC: don't close(-1)

Change-Id: I12a088d1ae424825abd3fffd171d6ec7ee49348a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Thiago Macieira 2022-10-12 14:14:02 -07:00
parent c9eac98369
commit 70487ba447

View File

@ -51,7 +51,8 @@ bool QSharedMemoryPosix::handle(QSharedMemoryPrivate *self)
bool QSharedMemoryPosix::cleanHandle(QSharedMemoryPrivate *)
{
qt_safe_close(hand);
if (hand != -1)
qt_safe_close(hand);
hand = -1;
return true;