summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp')
-rw-r--r--tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp b/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp
index e4b5d9ab8f..5d1a743dd9 100644
--- a/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp
+++ b/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.cpp
@@ -50,10 +50,10 @@ int main(int argc, char *argv[])
option = QString::fromLocal8Bit(argv[2]);
if (option == "-crash") {
- QLockFile *lockFile = new QLockFile(lockName);
- lockFile->lock();
- // leak the lockFile on purpose, so that the lock remains!
- return 0;
+ QLockFile lockFile(lockName);
+ lockFile.lock();
+ // exit on purpose, so that the lock remains!
+ exit(0);
} else if (option == "-busy") {
QLockFile lockFile(lockName);
lockFile.lock();