More fallout from OOM in NSS
authorJiri Olsa <jolsa@redhat.com>
Thu, 6 Oct 2011 07:14:21 +0000 (03:14 -0400)
committerUlrich Drepper <drepper@gmail.com>
Thu, 6 Oct 2011 07:14:21 +0000 (03:14 -0400)
ChangeLog
nss/nsswitch.c

index 33eeafb..52d4f1c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-09-25  Jiri Olsa  <jolsa@redhat.com>
+
+       * nss/nsswitch.c (__nss_database_lookup): Handle
+       nss_parse_service_list out of memory case.
+
 2011-09-15  Jiri Olsa  <jolsa@redhat.com>
 
        * nss/nsswitch.c (__nss_lookup_function): Handle __tsearch
index 535d93b..ac73984 100644 (file)
@@ -147,7 +147,7 @@ __nss_database_lookup (const char *database, const char *alternate_name,
 
   __libc_lock_unlock (lock);
 
-  return 0;
+  return *ni != NULL ? 0 : -1;
 }
 libc_hidden_def (__nss_database_lookup)