(exit): Beware to not free statically allocated list element.

This commit is contained in:
Ulrich Drepper 1999-10-11 04:35:54 +00:00
parent 5556d9fec4
commit b4f9680521

View File

@ -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