aboutsummaryrefslogtreecommitdiff
path: root/src/processor
diff options
context:
space:
mode:
authorted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2014-07-10 19:16:43 +0000
committerted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2014-07-10 19:16:43 +0000
commit9e8ffc9fabc46d8a59bc114f4c6cd999f79cd3f4 (patch)
treeaf236fe968651a447f5f58decc37855807f3c82b /src/processor
parentFix compilation error in Linux libc++ builds due to use of tr1/. (diff)
downloadbreakpad-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
Diffstat (limited to 'src/processor')
-rw-r--r--src/processor/basic_code_modules.cc6
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";
}