test/source/xmltesttools.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 1d29534e11c437c1b47135b64684da542fba2a64
Author: Julien Nabet <[email protected]>
AuthorDate: Thu Jul 4 18:19:34 2019 +0200
Commit: Julien Nabet <[email protected]>
CommitDate: Thu Jul 4 19:27:46 2019 +0200
cid#1448515: Resource leak (test/xmltesttools)
Change-Id: Ifadb599697fca738a41e4aad098edf4de32e174f
Reviewed-on: https://gerrit.libreoffice.org/75096
Reviewed-by: Michael Stahl <[email protected]>
Tested-by: Jenkins
diff --git a/test/source/xmltesttools.cxx b/test/source/xmltesttools.cxx
index 3c186dd08d63..42eeddc12bc3 100644
--- a/test/source/xmltesttools.cxx
+++ b/test/source/xmltesttools.cxx
@@ -85,7 +85,10 @@ OUString XmlTestTools::getXPath(xmlDocPtr pXmlDoc, const
OString& rXPath, const
CPPUNIT_ASSERT_EQUAL_MESSAGE(OString("In <" + OString(pXmlDoc->name) + ">,
XPath '" + rXPath + "' number of nodes is incorrect").getStr(),
1, xmlXPathNodeSetGetLength(pXmlNodes));
if (rAttribute.isEmpty())
+ {
+ xmlXPathFreeObject(pXmlObj);
return OUString();
+ }
xmlNodePtr pXmlNode = pXmlNodes->nodeTab[0];
xmlChar * prop = xmlGetProp(pXmlNode, BAD_CAST(rAttribute.getStr()));
OString sAttAbsent = "In <" + OString(pXmlDoc->name) + ">, XPath '" +
rXPath
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits