mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 20:40:05 +00:00
resolv_conf: release lock on allocation failure (bug 30527)
When the initial allocation of global fails, the local lock is left locked. Reported by Steffen Lammel of SAP HANA development.
This commit is contained in:
parent
85e6d8b417
commit
abcf8db7fa
@ -93,7 +93,10 @@ get_locked_global (void)
|
||||
{
|
||||
global_copy = calloc (1, sizeof (*global));
|
||||
if (global_copy == NULL)
|
||||
return NULL;
|
||||
{
|
||||
__libc_lock_unlock (lock);
|
||||
return NULL;
|
||||
}
|
||||
atomic_store_relaxed (&global, global_copy);
|
||||
resolv_conf_array_init (&global_copy->array);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user