fix one bug in symfile.c
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.
This commit is contained in:
parent
1abaf0423f
commit
a991ac289d
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue