about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2011-10-06 03:14:21 -0400
committerUlrich Drepper <drepper@gmail.com>2011-10-06 03:14:21 -0400
commit64031225b2595620658640c0b7e01311c8b69a06 (patch)
tree4d8ecbd0585a48ba52bebb37227b28e7f34519e1
parent0490345c9fd1f3368f3a515435b0c8a7f6f739fc (diff)
downloadglibc-64031225b2595620658640c0b7e01311c8b69a06.tar.gz
glibc-64031225b2595620658640c0b7e01311c8b69a06.tar.xz
glibc-64031225b2595620658640c0b7e01311c8b69a06.zip
More fallout from OOM in NSS
-rw-r--r--ChangeLog5
-rw-r--r--nss/nsswitch.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 33eeafb4ca..52d4f1c1d8 100644
--- 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
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
index 535d93bb95..ac73984576 100644
--- a/nss/nsswitch.c
+++ b/nss/nsswitch.c
@@ -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)