diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-28 06:10:24 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-28 06:10:24 (GMT) |
commit | 80e13f5bd418395bd64396e359a288b748ae1dfb (patch) | |
tree | 6a1f8bcc9ea0f6479709bd4e40e54737fa8c52e3 | |
parent | 3d54d228d3fa8003f883275f775c37c2c031d9cc (diff) | |
parent | 2636e58e748d066096472bc9822f89ba9d4b47a3 (diff) | |
download | Qt-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.
-rw-r--r-- | src/testlib/qtestresult.cpp | 5 |
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; |