about summary refs log tree commit diff
diff options
context:
space:
mode:
-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)