summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRitt Konstantin <ritt.ks@gmail.com>2011-06-06 12:56:43 (GMT)
committerHarald Fernengel <harald.fernengel@nokia.com>2011-06-06 12:56:43 (GMT)
commit1c2a9b1294dd7dd0762f4f57c29284d8491125ff (patch)
tree9298d3c1c39918a6c06518b999caac3204781a3b
parent9d0c57b225d3a9a771edf4f4b4c557430560761d (diff)
downloadQt-1c2a9b1294dd7dd0762f4f57c29284d8491125ff.zip
Qt-1c2a9b1294dd7dd0762f4f57c29284d8491125ff.tar.gz
Qt-1c2a9b1294dd7dd0762f4f57c29284d8491125ff.tar.bz2
fix potential keyfile leaking
according to close(2) manpages, it could return with EINTR; use EINTR-safe version of close() from qcore_unix_p.h Merge-request: 1248 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
-rw-r--r--src/corelib/kernel/qsharedmemory_unix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp
index 2bbda49..286a1b8 100644
--- a/src/corelib/kernel/qsharedmemory_unix.cpp
+++ b/src/corelib/kernel/qsharedmemory_unix.cpp
@@ -162,7 +162,7 @@ int QSharedMemoryPrivate::createUnixKeyFile(const QString &fileName)
return 0;
return -1;
} else {
- close(fd);
+ qt_safe_close(fd);
}
return 1;
}