coverity#1209779 & coverity#1209780 Resource leak

Have the testBasics() function clean up after itself - delete p2 and
p4 at the end of the function.

Change-Id: Ib0c732e1962da94fde0e0da307f610dd36f49eda
This commit is contained in:
Chris Sherlock 2014-05-01 23:42:49 +10:00
parent cedbbe2f78
commit 8bf0b9536c
2 changed files with 4 additions and 0 deletions

View file

@ -78,6 +78,8 @@ class MacroSnippet
sSource = sCode;
}
}
free(buffer);
}
}
CPPUNIT_ASSERT_MESSAGE( "Source is empty", ( sSource.getLength() > 0 ) );

View file

@ -68,6 +68,8 @@ public:
CPPUNIT_ASSERT( aVec.erase(p2) == 0 );
aVec.DeleteAndDestroyAll();
delete p2;
delete p4;
}
void testErase()