mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-28 04:13:28 +08:00
* source.c (find_and_open_source): Consistently pass resulting
full path through xfullpath.
This commit is contained in:
11
gdb/source.c
11
gdb/source.c
@ -997,7 +997,16 @@ find_and_open_source (const char *filename,
|
||||
|
||||
result = open (*fullname, OPEN_MODE);
|
||||
if (result >= 0)
|
||||
return result;
|
||||
{
|
||||
/* Call xfullpath here to be consistent with openp
|
||||
which we use below. */
|
||||
char *lpath = xfullpath (*fullname);
|
||||
|
||||
xfree (*fullname);
|
||||
*fullname = lpath;
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Didn't work -- free old one, try again. */
|
||||
xfree (*fullname);
|
||||
*fullname = NULL;
|
||||
|
Reference in New Issue
Block a user