mirror of git://sourceware.org/git/glibc.git
Fix typo.
* stdlib/exit.c (exit): Beware to not free statically allocated
This commit is contained in:
parent
cc97b1e5f0
commit
bca9f4abe8
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
* stdlib/atexit.c (initial): New variable. Use to initialize
|
* stdlib/atexit.c (initial): New variable. Use to initialize
|
||||||
__exit_funcs.
|
__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].
|
list element [PR libc/1305].
|
||||||
|
|
||||||
* stdlib/xpg_basename.c (__xpg_basename): Don't return pointer to
|
* stdlib/xpg_basename.c (__xpg_basename): Don't return pointer to
|
||||||
|
|
|
@ -62,7 +62,10 @@ exit (int status)
|
||||||
|
|
||||||
old = __exit_funcs;
|
old = __exit_funcs;
|
||||||
__exit_funcs = __exit_funcs->next;
|
__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
|
#ifdef HAVE_GNU_LD
|
||||||
|
|
Loading…
Reference in New Issue