diff options
Diffstat (limited to 'gdb/dwarf2-frame.c')
-rw-r--r-- | gdb/dwarf2-frame.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c index 0f6da40..427f58f 100644 --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -352,8 +352,11 @@ execute_stack_op (gdb_byte *exp, ULONGEST len, int addr_size, { struct dwarf_expr_context *ctx; CORE_ADDR result; + struct cleanup *old_chain; ctx = new_dwarf_expr_context (); + old_chain = make_cleanup_free_dwarf_expr_context (ctx); + ctx->gdbarch = get_frame_arch (this_frame); ctx->addr_size = addr_size; ctx->baton = this_frame; @@ -369,7 +372,7 @@ execute_stack_op (gdb_byte *exp, ULONGEST len, int addr_size, if (ctx->in_reg) result = read_reg (this_frame, result); - free_dwarf_expr_context (ctx); + do_cleanups (old_chain); return result; } |