summaryrefslogtreecommitdiffstats
path: root/src/corelib/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/ipc')
-rw-r--r--src/corelib/ipc/qsharedmemory_systemv.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/ipc/qsharedmemory_systemv.cpp b/src/corelib/ipc/qsharedmemory_systemv.cpp
index 716b7aedd11..ddf9a36cd67 100644
--- a/src/corelib/ipc/qsharedmemory_systemv.cpp
+++ b/src/corelib/ipc/qsharedmemory_systemv.cpp
@@ -76,6 +76,7 @@ key_t QSharedMemorySystemV::handle(QSharedMemoryPrivate *self)
unix_key = ftok(nativeKeyFile, int(self->nativeKey.type()));
if (unix_key < 0) {
self->setUnixErrorString("QSharedMemory::handle"_L1);
+ nativeKeyFile.clear();
unix_key = 0;
}
return unix_key;