This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RFC: missing do_cleanups call in dwarf2_frame_cache
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 02 Aug 2012 10:08:05 -0600
- Subject: RFC: missing do_cleanups call in dwarf2_frame_cache
While debugging a different problem, I found a spot in
dwarf2_frame_cache that fails to call do_cleanups before returning. The
usual rule is that ordinary functions should not leave any dangling
cleanups.
Built and regtested on x86-64 Fedora 16.
Tom
* dwarf2-frame.c (dwarf2_frame_cache): Call do_cleanups before
return.
---
gdb/dwarf2-frame.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index 01786ef..741a103 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -1110,6 +1110,7 @@ dwarf2_frame_cache (struct frame_info *this_frame, void **this_cache)
if (ex.error == NOT_AVAILABLE_ERROR)
{
cache->unavailable_retaddr = 1;
+ do_cleanups (old_chain);
return cache;
}
--
1.7.7.6