(__getmntent_r): Don't return with locked stream.
authordrepper <drepper>
Wed, 8 Jul 1998 22:32:19 +0000 (22:32 +0000)
committerdrepper <drepper>
Wed, 8 Jul 1998 22:32:19 +0000 (22:32 +0000)
misc/mntent_r.c

index 9567a6f..94b1d15 100644 (file)
@@ -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 */