From: Jiri Olsa Date: Thu, 6 Oct 2011 07:14:21 +0000 (-0400) Subject: More fallout from OOM in NSS X-Git-Tag: glibc-2.15~273 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64031225b2595620658640c0b7e01311c8b69a06;p=thirdparty%2Fglibc.git More fallout from OOM in NSS --- diff --git a/ChangeLog b/ChangeLog index 33eeafb4ca5..52d4f1c1d85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-09-25 Jiri Olsa + + * nss/nsswitch.c (__nss_database_lookup): Handle + nss_parse_service_list out of memory case. + 2011-09-15 Jiri Olsa * nss/nsswitch.c (__nss_lookup_function): Handle __tsearch diff --git a/nss/nsswitch.c b/nss/nsswitch.c index 535d93bb959..ac73984576d 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)