diff options
Diffstat (limited to 'shadow')
-rw-r--r-- | shadow/fgetspent_r.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/shadow/fgetspent_r.c b/shadow/fgetspent_r.c index 4614b514c8..403eecf761 100644 --- a/shadow/fgetspent_r.c +++ b/shadow/fgetspent_r.c @@ -42,7 +42,10 @@ __fgetspent_r (FILE *stream, struct spwd *resbuf, char *buffer, size_t buflen, { p = fgets (buffer, buflen, stream); if (p == NULL) - return errno; + { + *result = NULL; + return errno; + } /* Skip leading blanks. */ while (isspace (*p)) |