aboutsummaryrefslogtreecommitdiff
path: root/stdlib/atexit.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-10-11 04:32:44 +0000
committerUlrich Drepper <drepper@redhat.com>1999-10-11 04:32:44 +0000
commitcc97b1e5f0c84830f4937f2417928dd4d5f858b8 (patch)
tree668dabce5734c9b49350ce8780fe512d0fecc46d /stdlib/atexit.c
parent64ad0de291ebb06a0bb0ed9c6dd8e4069c9e7794 (diff)
downloadglibc-cc97b1e5f0c84830f4937f2417928dd4d5f858b8.zip
glibc-cc97b1e5f0c84830f4937f2417928dd4d5f858b8.tar.gz
glibc-cc97b1e5f0c84830f4937f2417928dd4d5f858b8.tar.bz2
Update.
* stdlib/atexit.c (initial): New variable. Use to initialize __exit_funcs. * stdlib/exit.c (exit): Beware to not free statically allocale list element [PR libc/1305].
Diffstat (limited to 'stdlib/atexit.c')
-rw-r--r--stdlib/atexit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/stdlib/atexit.c b/stdlib/atexit.c
index 80cd79f..e9648d6 100644
--- a/stdlib/atexit.c
+++ b/stdlib/atexit.c
@@ -40,7 +40,8 @@ atexit (void (*func) (void))
__libc_lock_define_initialized (static, lock)
-struct exit_function_list *__exit_funcs;
+static struct exit_function_list initial;
+struct exit_function_list *__exit_funcs = &initial;
struct exit_function *
__new_exitfn (void)