diff options
author | ted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2014-07-10 19:16:43 +0000 |
---|---|---|
committer | ted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2014-07-10 19:16:43 +0000 |
commit | 9e8ffc9fabc46d8a59bc114f4c6cd999f79cd3f4 (patch) | |
tree | af236fe968651a447f5f58decc37855807f3c82b | |
parent | Fix compilation error in Linux libc++ builds due to use of tr1/. (diff) | |
download | breakpad-9e8ffc9fabc46d8a59bc114f4c6cd999f79cd3f4.tar.xz |
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
-rw-r--r-- | src/processor/basic_code_modules.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/processor/basic_code_modules.cc b/src/processor/basic_code_modules.cc index 71874bed..588140c8 100644 --- a/src/processor/basic_code_modules.cc +++ b/src/processor/basic_code_modules.cc @@ -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"; } |