mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-02-19 00:39:38 +00:00
Tiny fix for memory allocation/deallocation mismatch
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@722 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
@@ -464,7 +464,7 @@ TEST_F(TestFastSourceLineResolver, CompareModule) {
|
||||
ASSERT_TRUE(SourceLineResolverBase::ReadSymbolFile(
|
||||
&symbol_data, symbol_file(module_index)));
|
||||
symbol_data_string = symbol_data;
|
||||
delete symbol_data;
|
||||
delete [] symbol_data;
|
||||
ASSERT_TRUE(module_comparer.Compare(symbol_data_string));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,10 +70,14 @@ class ModuleSerializer {
|
||||
// Serializes a loaded Module object into a chunk of memory data and returns
|
||||
// the address of memory chunk. If size != NULL, *size is set to the memory
|
||||
// size allocated for the serialized data.
|
||||
// Caller takes the ownership of the memory chunk (allocated on heap), and
|
||||
// should call delete instead of delete [] to free it.
|
||||
char* Serialize(const BasicSourceLineResolver::Module &module,
|
||||
unsigned int *size = NULL);
|
||||
|
||||
// Given the string format symbol_data, produces a chunk of serialized data.
|
||||
// Caller takes ownership of the serialized data (on heap), and should call
|
||||
// delete instead of delete [] to free it.
|
||||
char* SerializeSymbolFileData(const string &symbol_data,
|
||||
unsigned int *size = NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user