diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-06 00:10:37 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-06 00:10:37 +0000 |
commit | f92e5c37316fc6b59bb3937e0576a610809ae567 (patch) | |
tree | 7c5f3ec4e0cc17f090ce5bb81724998a5c3647f6 /lib/libc/gen | |
parent | 1708021ff9109001a4f0c79c7d80d49f9d3954ba (diff) |
cope better if realloc fails; better fix than cloder@acm.org
Diffstat (limited to 'lib/libc/gen')
-rw-r--r-- | lib/libc/gen/getpwent.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index f82e8b5f689..036a35c7f4b 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -33,7 +33,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getpwent.c,v 1.25 2002/05/24 21:22:37 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: getpwent.c,v 1.26 2002/07/06 00:10:36 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -1002,6 +1002,7 @@ __hashpw(key) if (line) free(line); line = NULL; + max = 0; return 0; } line = nline; |