diff options
author | João Abecasis <joao@abecasis.name> | 2009-09-02 10:33:54 (GMT) |
---|---|---|
committer | João Abecasis <joao@abecasis.name> | 2009-09-02 12:00:02 (GMT) |
commit | fef5f0fda91f36a9be0394d555c124abf13d672d (patch) | |
tree | 759b982e311f1809407e51d7a4338b2372076b2b /src/corelib | |
parent | 7ff422ac9a4f953ac81d283815701659e0405d6f (diff) | |
download | Qt-fef5f0fda91f36a9be0394d555c124abf13d672d.zip Qt-fef5f0fda91f36a9be0394d555c124abf13d672d.tar.gz Qt-fef5f0fda91f36a9be0394d555c124abf13d672d.tar.bz2 |
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.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp index e411681..f62577e 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) { |