[Libreoffice-commits] core.git: test/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 4 17:28:33 UTC 2019
test/source/xmltesttools.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 1d29534e11c437c1b47135b64684da542fba2a64
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Thu Jul 4 18:19:34 2019 +0200
Commit: Julien Nabet <serval2412 at yahoo.fr>
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 <Michael.Stahl at cib.de>
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
More information about the Libreoffice-commits
mailing list