From 2601814987fdac8d0b1d655d40987c331f3e51f4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 20 May 2021 09:11:48 +0200 Subject: [PATCH] fix leak in CppunitTest_oox_crypto Change-Id: I41d4fe581842cb7822ae899dc6ee6a43e485d211 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115856 Tested-by: Jenkins Reviewed-by: Noel Grandin --- oox/qa/unit/CryptoTest.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/oox/qa/unit/CryptoTest.cxx b/oox/qa/unit/CryptoTest.cxx index 94f1f765fc2b..cbdf99b65216 100644 --- a/oox/qa/unit/CryptoTest.cxx +++ b/oox/qa/unit/CryptoTest.cxx @@ -7,6 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include #include #include #include @@ -20,11 +21,16 @@ #include #include +#if USE_TLS_NSS +#include +#endif + using namespace css; class CryptoTest : public CppUnit::TestFixture { public: + virtual ~CryptoTest() override; void testCryptoHash(); void testRoundUp(); void testStandard2007(); @@ -58,6 +64,13 @@ std::string toString(std::vector const& aInput) } } +CryptoTest::~CryptoTest() +{ +#if USE_TLS_NSS + NSS_Shutdown(); +#endif +} + void CryptoTest::testCryptoHash() { // Check examples from Wikipedia (https://en.wikipedia.org/wiki/HMAC)