* source.c (find_and_open_source): Consistently pass resulting

full path through xfullpath.
This commit is contained in:
Doug Evans 2012-04-11 18:37:14 +00:00
parent 9e529e1d3d
commit bc3aa6c300
2 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2012-04-11 Yuanhui Zhang <asmwarrior@gmail.com>
* source.c (find_and_open_source): Consistently pass resulting
full path through xfullpath.
2012-04-11 Jan Kratochvil <jan.kratochvil@redhat.com>
Provide more specific displaced-stepping memory error message.

View File

@ -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;