Fixing a mem leak in test code
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@975 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
6de969a304
commit
1a7a0a4d4b
4 changed files with 26 additions and 9 deletions
|
@ -94,9 +94,7 @@ class StackwalkerARMFixture {
|
|||
// Set the Breakpad symbol information that supplier should return for
|
||||
// MODULE to INFO.
|
||||
void SetModuleSymbols(MockCodeModule *module, const string &info) {
|
||||
unsigned int buffer_size = info.size() + 1;
|
||||
char *buffer = reinterpret_cast<char*>(operator new(buffer_size));
|
||||
strcpy(buffer, info.c_str());
|
||||
char *buffer = supplier.CopySymbolDataAndOwnTheCopy(info);
|
||||
EXPECT_CALL(supplier, GetCStringSymbolData(module, &system_info, _, _))
|
||||
.WillRepeatedly(DoAll(SetArgumentPointee<3>(buffer),
|
||||
Return(MockSymbolSupplier::FOUND)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue