Kaydet (Commit) 04785775 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1302688 Resource leak

Change-Id: I78ed5df0d18da9374092c8d2d4fca43cba0f8a88
üst 52052e5b
...@@ -5931,10 +5931,10 @@ void testDataBarLengthImpl(ScDocument* pDoc, ScDataBarLengthData* pData, const S ...@@ -5931,10 +5931,10 @@ void testDataBarLengthImpl(ScDocument* pDoc, ScDataBarLengthData* pData, const S
for (size_t i = 0; pData[i].nLength != -200; ++i) for (size_t i = 0; pData[i].nLength != -200; ++i)
{ {
ScDataBarInfo* pInfo = pDatabar->GetDataBarInfo(ScAddress(nCol, i, 0)); std::unique_ptr<ScDataBarInfo> xInfo(pDatabar->GetDataBarInfo(ScAddress(nCol, i, 0)));
CPPUNIT_ASSERT(pInfo); CPPUNIT_ASSERT(xInfo.get());
ASSERT_DOUBLES_EQUAL(pData[i].nLength, pInfo->mnLength); ASSERT_DOUBLES_EQUAL(pData[i].nLength, xInfo->mnLength);
ASSERT_DOUBLES_EQUAL(nZeroPos, pInfo->mnZero); ASSERT_DOUBLES_EQUAL(nZeroPos, xInfo->mnZero);
} }
delete pFormat; delete pFormat;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment