From 9e8ffc9fabc46d8a59bc114f4c6cd999f79cd3f4 Mon Sep 17 00:00:00 2001 From: "ted.mielczarek@gmail.com" Date: Thu, 10 Jul 2014 19:16:43 +0000 Subject: [PATCH] Don't free pointer in BasicCodeModules::BasicCodeModules before possibly using it A=Jim Chen 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 --- src/processor/basic_code_modules.cc | 6 +++--- 1 file 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(module))) { + linked_ptr 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"; }