From dbd8eab63b3cfc83a07fcb40c8111bf21c16c5ab Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Tue, 28 Feb 2023 11:34:41 -0800 Subject: [PATCH] Remove memory leak in case where argB contains invalid WKT --- tests/xmltester/XMLTester.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/xmltester/XMLTester.cpp b/tests/xmltester/XMLTester.cpp index 8e238ac1f3..4bd67edef3 100644 --- a/tests/xmltester/XMLTester.cpp +++ b/tests/xmltester/XMLTester.cpp @@ -703,6 +703,8 @@ XMLTester::parseCase(const tinyxml2::XMLNode* node) std::cout << *curr_file << ":"; std::cout << " case" << caseCount << ":"; std::cout << " skipped (" << thrownException << ")." << std::endl; + if (gA) delete gA; + if (gB) delete gB; return; }