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