summaryrefslogtreecommitdiff
path: root/test/qa
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-05-05 19:10:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-07 09:52:27 +0200
commitec6eaa58addf0d8823f8c56d4ec168ff389da8c5 (patch)
treeadb44639fc6bdecad5f576aa5e1aa90f3c9d64b3 /test/qa
parentc437948f6c0d602bb200fc92e80cb73ae8ae5109 (diff)
fix memory leak of xmlDoc objects
in unit tests Change-Id: Id16731bbbe2f1b0e3642722d77aba04fc98db4cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93508 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'test/qa')
-rw-r--r--test/qa/cppunit/test_xpath.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/qa/cppunit/test_xpath.cxx b/test/qa/cppunit/test_xpath.cxx
index a5693d1c9f76..12852fc7dc6e 100644
--- a/test/qa/cppunit/test_xpath.cxx
+++ b/test/qa/cppunit/test_xpath.cxx
@@ -19,7 +19,7 @@ CPPUNIT_TEST_FIXTURE(TestXPath, test_getXPath)
{
const xmlChar s_xml[] = "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>"
"<xml><item attrib='val'>text</item></xml>";
- xmlDocPtr pTable = xmlParseDoc(s_xml);
+ xmlDocUniquePtr pTable(xmlParseDoc(s_xml));
CPPUNIT_ASSERT(pTable);
// Must get existing element content without errors
CPPUNIT_ASSERT_ASSERTION_PASS(getXPath(pTable, "/xml/item", ""));