diff options
Diffstat (limited to 'newlib/libc/sys/phoenix/getmntent.c')
-rw-r--r-- | newlib/libc/sys/phoenix/getmntent.c | 2 |
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; } |