mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-13 14:50:17 +00:00
(exit): Beware to not free statically allocated list element.
This commit is contained in:
parent
5556d9fec4
commit
b4f9680521
@ -62,7 +62,10 @@ exit (int status)
|
||||
|
||||
old = __exit_funcs;
|
||||
__exit_funcs = __exit_funcs->next;
|
||||
free (old);
|
||||
if (__exit_funcs != NULL)
|
||||
/* Don't free the last element in the chain, this is the statically
|
||||
allocate element. */
|
||||
free (old);
|
||||
}
|
||||
|
||||
#ifdef HAVE_GNU_LD
|
||||
|
Loading…
Reference in New Issue
Block a user