mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-12 16:20:06 +00:00
Handle OOM in NSS
This commit is contained in:
parent
3a62d00d40
commit
0490345c9f
@ -1,3 +1,8 @@
|
||||
2011-09-15 Jiri Olsa <jolsa@redhat.com>
|
||||
|
||||
* nss/nsswitch.c (__nss_lookup_function): Handle __tsearch
|
||||
out of memory case.
|
||||
|
||||
2011-10-04 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* include/dlfcn.h (__RTLD_NOIFUNC): Define.
|
||||
|
@ -384,7 +384,10 @@ __nss_lookup_function (service_user *ni, const char *fct_name)
|
||||
will be passed to `known_compare' (above). */
|
||||
|
||||
found = __tsearch (&fct_name, &ni->known, &known_compare);
|
||||
if (*found != &fct_name)
|
||||
if (found == NULL)
|
||||
/* This means out-of-memory. */
|
||||
result = NULL;
|
||||
else if (*found != &fct_name)
|
||||
{
|
||||
/* The search found an existing structure in the tree. */
|
||||
result = ((known_function *) *found)->fct_ptr;
|
||||
|
Loading…
Reference in New Issue
Block a user