diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-22 13:24:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-22 14:35:39 +0200 |
commit | d4661d66f5735a80613d5e7dcffdd01d7e18d896 (patch) | |
tree | 93d8a28a13d3b41b12706cd7d446dcfc585f9253 /desktop | |
parent | 451b9802dd708e646273839829845800e13db47e (diff) |
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.cxx | 5 |
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); } } |