mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user