find_separate_debug_file could leak a cleanup along some return paths.
* symfile.c (find_separate_debug_file): Call do_cleanups
along all return paths.
+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
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. */
strcat (debugfile, debuglink);
if (separate_debug_file_exists (debugfile, crc32, objfile))
- return debugfile;
+ {
+ do_cleanups (back_to);
+ return debugfile;
+ }
}
}