Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
Diffstat (limited to 'newlib')
-rw-r--r--newlib/libc/sys/phoenix/getmntent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/sys/phoenix/getmntent.c b/newlib/libc/sys/phoenix/getmntent.c
index 74d00b15b..e61d24503 100644
--- a/newlib/libc/sys/phoenix/getmntent.c
+++ b/newlib/libc/sys/phoenix/getmntent.c
@@ -47,7 +47,7 @@ struct mntent *getmntent_r(FILE *fp, struct mntent *result, char *buffer, int bu
buff_ptr = buffer;
- if (getline(&line, &size, fp) == -1) {
+ if (getline(&line, &size, fp) == -1 || feof(fp)) {
free(line);
return NULL;
}