mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-12-01 03:04:21 +01:00
Don't free pointer in BasicCodeModules::BasicCodeModules before possibly using it
A=Jim Chen <nchen@mozilla.com> R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=1033006 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1346 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
21384ad0e2
commit
9e8ffc9fab
@ -64,9 +64,9 @@ BasicCodeModules::BasicCodeModules(const CodeModules *that)
|
||||
// GetModuleAtIndex because ordering is unimportant when slurping the
|
||||
// entire list, and GetModuleAtIndex may be faster than
|
||||
// GetModuleAtSequence.
|
||||
const CodeModule *module = that->GetModuleAtIndex(module_sequence)->Copy();
|
||||
if (!map_->StoreRange(module->base_address(), module->size(),
|
||||
linked_ptr<const CodeModule>(module))) {
|
||||
linked_ptr<const CodeModule> module(
|
||||
that->GetModuleAtIndex(module_sequence)->Copy());
|
||||
if (!map_->StoreRange(module->base_address(), module->size(), module)) {
|
||||
BPLOG(ERROR) << "Module " << module->code_file() <<
|
||||
" could not be stored";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user