Commit f23e0618 authored by Milian Wolff's avatar Milian Wolff
Browse files

Fix memory leak in TestProblemStoreNode

Fixes LSAN report:
Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7f7448582f41 in operator new(unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x55676af99e7c in TestProblemStoreNode::testLabelNode() /home/milian/projects/kf5/src/extragear/kdevelop/kdevelop/kdevplatform/shell/tests/test_problemstorenode.cpp:99
parent ed1c215b
......@@ -96,11 +96,11 @@ void TestProblemStoreNode::testLabelNode()
QString s1 = QStringLiteral("TEST1");
QString s2 = QStringLiteral("TEST2");
auto *node = new LabelNode(nullptr, s1);
QCOMPARE(node->label(), s1);
auto node = LabelNode(nullptr, s1);
QCOMPARE(node.label(), s1);
QCOMPARE(node->label(), s2);
QCOMPARE(node.label(), s2);
void TestProblemStoreNode::testProblemNode()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment