summary refs log tree commit diff
path: root/nss/getXXent.c
diff options
context:
space:
mode:
Diffstat (limited to 'nss/getXXent.c')
-rw-r--r--nss/getXXent.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/nss/getXXent.c b/nss/getXXent.c
index f180171150..eeb03dfa37 100644
--- a/nss/getXXent.c
+++ b/nss/getXXent.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -69,7 +69,7 @@ GETFUNC_NAME (void)
   static char *buffer;
   static size_t buffer_size;
   static LOOKUP_TYPE resbuf;
-  LOOKUP_TYPE *result = NULL;
+  LOOKUP_TYPE *result;
   int save;
 
   /* Get lock.  */
@@ -103,6 +103,9 @@ GETFUNC_NAME (void)
       buffer = new_buf;
     }
 
+  if (buffer == NULL)
+    result = NULL;
+
   /* Release lock.  Preserve error value.  */
   save = errno;
   __libc_lock_unlock (lock);