summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorJoão Abecasis <joao@abecasis.name>2009-09-02 12:33:54 +0200
committerJoão Abecasis <joao@abecasis.name>2009-09-02 14:00:02 +0200
commitfef5f0fda91f36a9be0394d555c124abf13d672d (patch)
tree759b982e311f1809407e51d7a4338b2372076b2b /src/corelib
parent7ff422ac9a4f953ac81d283815701659e0405d6f (diff)
Fix access to uninitialized memory
This was flagged by Coverity. We already have a struct filled from IPC_STAT above, we shouldn't be passing unitialized data for IPC_RMID. Reviewed-by: Marius Storm-Olsen
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/kernel/qsharedmemory_unix.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp
index e4116813c3..f62577eb5e 100644
--- a/src/corelib/kernel/qsharedmemory_unix.cpp
+++ b/src/corelib/kernel/qsharedmemory_unix.cpp
@@ -283,7 +283,6 @@ bool QSharedMemoryPrivate::detach()
// If there are no attachments then remove it.
if (shmid_ds.shm_nattch == 0) {
// mark for removal
- struct shmid_ds shmid_ds;
if (-1 == shmctl(id, IPC_RMID, &shmid_ds)) {
setErrorString(QLatin1String("QSharedMemory::remove"));
switch (errno) {