From b13847b3a340044b86ccdd729abb9434fffb5b44 Mon Sep 17 00:00:00 2001 From: drepper Date: Wed, 8 Jul 1998 22:32:19 +0000 Subject: [PATCH] (__getmntent_r): Don't return with locked stream. --- misc/mntent_r.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/misc/mntent_r.c b/misc/mntent_r.c index 9567a6f077..94b1d15c71 100644 --- a/misc/mntent_r.c +++ b/misc/mntent_r.c @@ -57,7 +57,10 @@ __getmntent_r (FILE *stream, struct mntent *mp, char *buffer, int bufsiz) char *end_ptr; if (fgets_unlocked (buffer, bufsiz, stream) == NULL) - return NULL; + { + funlockfile (stream); + return NULL; + } end_ptr = strchr (buffer, '\n'); if (end_ptr != NULL) /* chop newline */ -- 2.11.0