summaryrefslogtreecommitdiffstats
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-22 13:24:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-22 14:35:39 +0200
commitd4661d66f5735a80613d5e7dcffdd01d7e18d896 (patch)
tree93d8a28a13d3b41b12706cd7d446dcfc585f9253 /desktop
parenttdf#141559 sc UI: add Clear Filter to Autofilter widget (diff)
downloadcore-d4661d66f5735a80613d5e7dcffdd01d7e18d896.tar.gz
core-d4661d66f5735a80613d5e7dcffdd01d7e18d896.zip
fix leak in desktop test
Change-Id: I6d6ae4a59777b17fda39b81ce867c2ee4a753a43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115986 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index a165cf6e8652..13370261a0fc 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -478,6 +478,7 @@ void DesktopLOKTest::testGetStyles()
CPPUNIT_FAIL("Unknown style family: " + rPair.first);
}
}
+ free(pJSON);
}
void DesktopLOKTest::testGetFonts()
@@ -1031,7 +1032,9 @@ void DesktopLOKTest::testSheetOperations()
std::vector<OString> aExpected = { "FirstSheet", "Renamed", "Sheet3", "Sheet4", "Sheet5", "LastSheet" };
for (int i = 0; i < 6; ++i)
{
- CPPUNIT_ASSERT_EQUAL(aExpected[i], OString(pDocument->pClass->getPartName(pDocument, i)));
+ char* pPartName = pDocument->pClass->getPartName(pDocument, i);
+ CPPUNIT_ASSERT_EQUAL(aExpected[i], OString(pPartName));
+ free(pPartName);
}
}