forked from Imagelibrary/binutils-gdb
* main.c (relocate_gdb_directory): Avoid calling stat function
if DIR is empty.
This commit is contained in:
@@ -126,7 +126,7 @@ relocate_gdb_directory (const char *initial, int flag)
|
||||
{
|
||||
struct stat s;
|
||||
|
||||
if (stat (dir, &s) != 0 || !S_ISDIR (s.st_mode))
|
||||
if (*dir == '\0' || stat (dir, &s) != 0 || !S_ISDIR (s.st_mode))
|
||||
{
|
||||
xfree (dir);
|
||||
dir = NULL;
|
||||
|
||||
Reference in New Issue
Block a user