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:
parent
cedbbe2f78
commit
8bf0b9536c
2 changed files with 4 additions and 0 deletions
|
@ -78,6 +78,8 @@ class MacroSnippet
|
|||
sSource = sCode;
|
||||
}
|
||||
}
|
||||
|
||||
free(buffer);
|
||||
}
|
||||
}
|
||||
CPPUNIT_ASSERT_MESSAGE( "Source is empty", ( sSource.getLength() > 0 ) );
|
||||
|
|
|
@ -68,6 +68,8 @@ public:
|
|||
CPPUNIT_ASSERT( aVec.erase(p2) == 0 );
|
||||
|
||||
aVec.DeleteAndDestroyAll();
|
||||
delete p2;
|
||||
delete p4;
|
||||
}
|
||||
|
||||
void testErase()
|
||||
|
|
Loading…
Reference in a new issue