diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-05-31 20:59:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-06-01 17:41:22 +0100 |
commit | 047857759995d4eccec5451db339ebd1f53fd285 (patch) | |
tree | 4cca4c8b19712ed1604fe9bebf8b78153fc8114c /sc | |
parent | 52052e5b03a605f261ab041233a5c6b3c8a19143 (diff) |
coverity#1302688 Resource leak
Change-Id: I78ed5df0d18da9374092c8d2d4fca43cba0f8a88
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index c16dfb89b762..7eb21f5d368a 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -5931,10 +5931,10 @@ void testDataBarLengthImpl(ScDocument* pDoc, ScDataBarLengthData* pData, const S for (size_t i = 0; pData[i].nLength != -200; ++i) { - ScDataBarInfo* pInfo = pDatabar->GetDataBarInfo(ScAddress(nCol, i, 0)); - CPPUNIT_ASSERT(pInfo); - ASSERT_DOUBLES_EQUAL(pData[i].nLength, pInfo->mnLength); - ASSERT_DOUBLES_EQUAL(nZeroPos, pInfo->mnZero); + std::unique_ptr<ScDataBarInfo> xInfo(pDatabar->GetDataBarInfo(ScAddress(nCol, i, 0))); + CPPUNIT_ASSERT(xInfo.get()); + ASSERT_DOUBLES_EQUAL(pData[i].nLength, xInfo->mnLength); + ASSERT_DOUBLES_EQUAL(nZeroPos, xInfo->mnZero); } delete pFormat; } |