diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/dwarf_cu_to_module.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/dwarf_cu_to_module.cc b/src/common/dwarf_cu_to_module.cc index 8246daf9..1d157def 100644 --- a/src/common/dwarf_cu_to_module.cc +++ b/src/common/dwarf_cu_to_module.cc @@ -531,7 +531,7 @@ void DwarfCUToModule::FuncHandler::Finish() { if (low_pc_ < high_pc_) { // Create a Module::Function based on the data we've gathered, and // add it to the functions_ list. - Module::Function *func = new Module::Function; + scoped_ptr<Module::Function> func(new Module::Function); // Malformed DWARF may omit the name, but all Module::Functions must // have names. if (!name_.empty()) { @@ -546,7 +546,7 @@ void DwarfCUToModule::FuncHandler::Finish() { if (func->address) { // If the function address is zero this is a sign that this function // description is just empty debug data and should just be discarded. - cu_context_->functions.push_back(func); + cu_context_->functions.push_back(func.release()); } } else if (inline_) { AbstractOrigin origin(name_); |