mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 20:40:05 +00:00
Clear GL(dl_initfirst) when freeing its link_map memory [BZ# 25396]
We should clear GL(dl_initfirst) when freeing its link_map memory. Tested on Fedora 31/x86-64 with CET. Reviewed-by: Florian Weimer <fweimer@redhat.com>
This commit is contained in:
parent
791a08cf37
commit
5177d85b0c
@ -756,6 +756,10 @@ _dl_close_worker (struct link_map *map, bool force)
|
||||
if (imap->l_runpath_dirs.dirs != (void *) -1)
|
||||
free (imap->l_runpath_dirs.dirs);
|
||||
|
||||
/* Clear GL(dl_initfirst) when freeing its link_map memory. */
|
||||
if (imap == GL(dl_initfirst))
|
||||
GL(dl_initfirst) = NULL;
|
||||
|
||||
free (imap);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user