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>
This commit is contained in:
Noel Grandin
2021-05-22 14:35:39 +02:00
parent 451b9802dd
commit d4661d66f5
+4 -1
View File
@@ -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);
}
}