mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 14:00:30 +00:00
elf/tlsdeschtab.h: Add the Malloc return value check in _dl_make_tlsdesc_dynamic()
Check the return value of malloc based on the function header comment of _dl_make_tlsdesc_dynamic(). If the return value fails, NULL is returned. Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com> Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
This commit is contained in:
parent
9cc9d61ee1
commit
d1d0162e50
@ -110,6 +110,8 @@ _dl_make_tlsdesc_dynamic (struct link_map *map, size_t ti_offset)
|
||||
}
|
||||
|
||||
*entry = td = malloc (sizeof (struct tlsdesc_dynamic_arg));
|
||||
if (! td)
|
||||
return 0;
|
||||
/* This may be higher than the map's generation, but it doesn't
|
||||
matter much. Worst case, we'll have one extra DTV update per
|
||||
thread. */
|
||||
|
Loading…
Reference in New Issue
Block a user