mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
* 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