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"; }