mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-11-28 05:24:16 +01:00
Fix a memory leak in DwarfCUToModule::FuncHandler::Finish().
BUG=591 R=mark@chromium.org Review URL: https://breakpad.appspot.com/2704002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1333 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
5421a942f0
commit
3cef0e5645
@ -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_);
|
||||
|
Loading…
Reference in New Issue
Block a user