diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-05 19:10:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-07 09:52:27 +0200 |
commit | ec6eaa58addf0d8823f8c56d4ec168ff389da8c5 (patch) | |
tree | adb44639fc6bdecad5f576aa5e1aa90f3c9d64b3 /xmlsecurity/qa | |
parent | c437948f6c0d602bb200fc92e80cb73ae8ae5109 (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 'xmlsecurity/qa')
-rw-r--r-- | xmlsecurity/qa/unit/signing/signing.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx index 0475ff966127..eaecd6b7a9e5 100644 --- a/xmlsecurity/qa/unit/signing/signing.cxx +++ b/xmlsecurity/qa/unit/signing/signing.cxx @@ -746,7 +746,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testXAdESNotype) xMetaInf->openStreamElement("documentsignatures.xml", embed::ElementModes::READ), uno::UNO_QUERY); std::unique_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true)); - xmlDocPtr pXmlDoc = parseXmlStream(pStream.get()); + xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get()); // Without the accompanying fix in place, this test would have failed with "unexpected 'Type' // attribute", i.e. the signature without such an attribute was not preserved correctly. @@ -806,7 +806,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testXAdES) xMetaInf->openStreamElement("documentsignatures.xml", embed::ElementModes::READ), uno::UNO_QUERY); std::unique_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true)); - xmlDocPtr pXmlDoc = parseXmlStream(pStream.get()); + xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get()); // Assert that the digest algorithm is SHA-256 in the bAdESCompliant case, not SHA-1. assertXPath(pXmlDoc, |