From 56410c3d004d0456afc4f68468ad30dc6ef7747d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 14 May 2021 14:01:39 +0200 Subject: [PATCH] testunusedvar: fix mismatching allocation/deallocation in test --- test/testunusedvar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/testunusedvar.cpp b/test/testunusedvar.cpp index 832e60d09..a95e337f1 100644 --- a/test/testunusedvar.cpp +++ b/test/testunusedvar.cpp @@ -5036,7 +5036,7 @@ private: "void foo()\n" "{\n" " struct Fred* ptr = new Fred();\n" - " free(ptr);\n" + " delete ptr;\n" "}"); ASSERT_EQUALS("[test.cpp:4]: (style) Variable 'ptr' is allocated memory that is never used.\n", errout.str());