]> sourceware.org Git - glibc.git/commitdiff
Fix typo.
authorUlrich Drepper <drepper@redhat.com>
Mon, 11 Oct 1999 04:34:14 +0000 (04:34 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 11 Oct 1999 04:34:14 +0000 (04:34 +0000)
* stdlib/exit.c (exit): Beware to not free statically allocated

ChangeLog
stdlib/exit.c

index 47c6ab47981b06956cdd48047fb82a25e9e759fa..4ee3d2d027a529417be884175a8e79b4967c0943 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@
 
        * stdlib/atexit.c (initial): New variable.  Use to initialize
        __exit_funcs.
-       * stdlib/exit.c (exit): Beware to not free statically allocale
+       * stdlib/exit.c (exit): Beware to not free statically allocated
        list element [PR libc/1305].
 
        * stdlib/xpg_basename.c (__xpg_basename): Don't return pointer to
index dc189556b497e2985f39b3e3c8e5b7a234719669..f44c519aa75080a9cd083ba46972b4b402a4ff24 100644 (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
This page took 0.053203 seconds and 5 git commands to generate.