summaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/basic')
-rw-r--r--scripts/basic/fixdep.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 5b327c67a828..caef815d1743 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -274,7 +274,11 @@ static void do_config_file(const char *filename)
perror(filename);
exit(2);
}
- fstat(fd, &st);
+ if (fstat(fd, &st) < 0) {
+ fprintf(stderr, "fixdep: error fstat'ing config file: ");
+ perror(filename);
+ exit(2);
+ }
if (st.st_size == 0) {
close(fd);
return;