mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Stop crash in OOM handling in NSS
This commit is contained in:
@ -407,6 +407,7 @@ __nss_lookup_function (service_user *ni, const char *fct_name)
|
||||
/* Oops. We can't instantiate this node properly.
|
||||
Remove it from the tree. */
|
||||
__tdelete (&fct_name, &ni->known, &known_compare);
|
||||
free (known);
|
||||
result = NULL;
|
||||
}
|
||||
else
|
||||
@ -418,11 +419,8 @@ __nss_lookup_function (service_user *ni, const char *fct_name)
|
||||
#if !defined DO_STATIC_NSS || defined SHARED
|
||||
/* Load the appropriate library. */
|
||||
if (nss_load_library (ni) != 0)
|
||||
{
|
||||
/* This only happens when out of memory. */
|
||||
free (known);
|
||||
goto remove_from_tree;
|
||||
}
|
||||
/* This only happens when out of memory. */
|
||||
goto remove_from_tree;
|
||||
|
||||
if (ni->library->lib_handle == (void *) -1l)
|
||||
/* Library not found => function not found. */
|
||||
|
Reference in New Issue
Block a user