mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-11-24 05:55:39 +01:00
Fix memory leak in ppc stackwalker
BUG=756317 Change-Id: Id096372e5a0d1e7c70e95304b1f0c181f57d3882 Reviewed-on: https://chromium-review.googlesource.com/619126 Reviewed-by: Leonard Mosescu <mosescu@chromium.org>
This commit is contained in:
parent
38cbbfed71
commit
b1e7ec065d
@ -34,6 +34,7 @@
|
||||
// Author: Mark Mentovai
|
||||
|
||||
|
||||
#include "common/scoped_ptr.h"
|
||||
#include "processor/stackwalker_ppc.h"
|
||||
#include "google_breakpad/processor/call_stack.h"
|
||||
#include "google_breakpad/processor/memory_region.h"
|
||||
@ -121,7 +122,7 @@ StackFrame* StackwalkerPPC::GetCallerFrame(const CallStack* stack,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
StackFramePPC* frame = new StackFramePPC();
|
||||
scoped_ptr<StackFramePPC> frame(new StackFramePPC());
|
||||
|
||||
frame->context = last_frame->context;
|
||||
frame->context.srr0 = instruction;
|
||||
@ -147,7 +148,7 @@ StackFrame* StackwalkerPPC::GetCallerFrame(const CallStack* stack,
|
||||
// return address value may access the context.srr0 field of StackFramePPC.
|
||||
frame->instruction = frame->context.srr0 - 4;
|
||||
|
||||
return frame;
|
||||
return frame.release();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user