diff options
author | Pierre Muller <muller@sourceware.org> | 2013-01-03 22:18:35 +0000 |
---|---|---|
committer | Pierre Muller <muller@sourceware.org> | 2013-01-03 22:18:35 +0000 |
commit | 78a8b30e9dd47617db3002b3aebede4d619d00b1 (patch) | |
tree | fbb50be411cfdfd7082404f2f68428013a766192 /gdb/main.c | |
parent | 5b2ab15006f21ae2d10c18b5352fc195fff3db88 (diff) | |
download | binutils-gdb-78a8b30e9dd47617db3002b3aebede4d619d00b1.tar.gz |
* main.c (relocate_gdb_directory): Avoid calling stat function
if DIR is empty.
Diffstat (limited to 'gdb/main.c')
-rw-r--r-- | gdb/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/main.c b/gdb/main.c index 14893bdffd0..7cd2d03d957 100644 --- a/gdb/main.c +++ b/gdb/main.c @@ -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; |