summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/kernel/qsharedmemory.cpp6
-rw-r--r--src/corelib/kernel/qsharedmemory_unix.cpp1
-rw-r--r--src/corelib/kernel/qsharedmemory_win.cpp1
3 files changed, 3 insertions, 5 deletions
diff --git a/src/corelib/kernel/qsharedmemory.cpp b/src/corelib/kernel/qsharedmemory.cpp
index 2fd6c50..85b37d0 100644
--- a/src/corelib/kernel/qsharedmemory.cpp
+++ b/src/corelib/kernel/qsharedmemory.cpp
@@ -399,11 +399,7 @@ bool QSharedMemory::detach()
return false;
#endif
- if (d->detach()) {
- d->size = 0;
- return true;
- }
- return false;
+ return d->detach();
}
/*!
diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp
index bea5b63..3cd17f1 100644
--- a/src/corelib/kernel/qsharedmemory_unix.cpp
+++ b/src/corelib/kernel/qsharedmemory_unix.cpp
@@ -265,6 +265,7 @@ bool QSharedMemoryPrivate::detach()
return false;
}
memory = 0;
+ size = 0;
// Get the number of current attachments
if (!handle())
diff --git a/src/corelib/kernel/qsharedmemory_win.cpp b/src/corelib/kernel/qsharedmemory_win.cpp
index 5293f45..ac9c86a 100644
--- a/src/corelib/kernel/qsharedmemory_win.cpp
+++ b/src/corelib/kernel/qsharedmemory_win.cpp
@@ -186,6 +186,7 @@ bool QSharedMemoryPrivate::detach()
return false;
}
memory = 0;
+ size = 0;
// close handle
return cleanHandle();