diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-08-07 12:20:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-08-07 18:00:44 +0100 |
commit | f7f943d71faa8117f902289f95b9ffc7582a5320 (patch) | |
tree | 0734ce10785ea4c2071d52e339ced0c1510cda1b /sc | |
parent | 0273e9cde0626774dce273a9ff1b4ccbd4e75d9c (diff) |
coverity#1229887 Resource leak
Change-Id: I5f8ac14892682490d8cc93266368419107376206
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/ucalc_sharedformula.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc_sharedformula.cxx b/sc/qa/unit/ucalc_sharedformula.cxx index 1d17b9872465..d6ccdc53b4b2 100644 --- a/sc/qa/unit/ucalc_sharedformula.cxx +++ b/sc/qa/unit/ucalc_sharedformula.cxx @@ -1449,6 +1449,8 @@ void Test::testSharedFormulaUpdateOnDBChange() // Define database range 'MyRange' for A1:A2. ScDBData* pData = new ScDBData("MyRange", 0, 0, 0, 0, 1); bool bInserted = pDBs->getNamedDBs().insert(pData); + if (!bInserted) + delete pData; CPPUNIT_ASSERT_MESSAGE("Failed to insert a new database range.", bInserted); // Insert in C2:C4 a group of formula cells that reference MyRange. |