summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-28 06:10:24 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-28 06:10:24 (GMT)
commit80e13f5bd418395bd64396e359a288b748ae1dfb (patch)
tree6a1f8bcc9ea0f6479709bd4e40e54737fa8c52e3 /src/testlib
parent3d54d228d3fa8003f883275f775c37c2c031d9cc (diff)
parent2636e58e748d066096472bc9822f89ba9d4b47a3 (diff)
downloadQt-80e13f5bd418395bd64396e359a288b748ae1dfb.zip
Qt-80e13f5bd418395bd64396e359a288b748ae1dfb.tar.gz
Qt-80e13f5bd418395bd64396e359a288b748ae1dfb.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Fix a memory leak in the QTestLib.
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qtestresult.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/testlib/qtestresult.cpp b/src/testlib/qtestresult.cpp
index 8c52a82..bbe3e7f 100644
--- a/src/testlib/qtestresult.cpp
+++ b/src/testlib/qtestresult.cpp
@@ -191,10 +191,13 @@ bool QTestResult::expectFail(const char *dataIndex, const char *comment,
QTEST_ASSERT(comment);
QTEST_ASSERT(mode > 0);
- if (!isExpectFailData(dataIndex))
+ if (!isExpectFailData(dataIndex)) {
+ delete[] comment;
return true; // we don't care
+ }
if (QTest::expectFailMode) {
+ delete[] comment;
clearExpectFail();
addFailure("Already expecting a fail", file, line);
return false;