aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/symfile.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5331d5b..e3e8aa2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2013-05-30 Tom Tromey <tromey@redhat.com>
+ * symfile.c (find_separate_debug_file): Call do_cleanups
+ along all return paths.
+
+2013-05-30 Tom Tromey <tromey@redhat.com>
+
* symtab.c (search_symbols): Introduce a null cleanup for
'retval_chain'.
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 360f999..c2ad797 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1428,7 +1428,10 @@ find_separate_debug_file (const char *dir,
strcat (debugfile, debuglink);
if (separate_debug_file_exists (debugfile, crc32, objfile))
- return debugfile;
+ {
+ do_cleanups (back_to);
+ return debugfile;
+ }
/* If the file is in the sysroot, try using its base path in the
global debugfile directory. */
@@ -1443,7 +1446,10 @@ find_separate_debug_file (const char *dir,
strcat (debugfile, debuglink);
if (separate_debug_file_exists (debugfile, crc32, objfile))
- return debugfile;
+ {
+ do_cleanups (back_to);
+ return debugfile;
+ }
}
}