diff --git a/newlib/ChangeLog b/newlib/ChangeLog index a244668fe..25d30d08c 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2013-08-19 Meador Inge + + * libc/stdlib/__atexit.c (__register_exitproc): NULL-ify + _on_exit_args_ptr when creating a new _atexit structure while + _REENT_SMALL is defined. + 2013-08-12 Bin Cheng * libc/configure.in (--enable-newlib-wchar-orient): Remove. diff --git a/newlib/libc/stdlib/__atexit.c b/newlib/libc/stdlib/__atexit.c index d36a1a4e5..18edc8c91 100644 --- a/newlib/libc/stdlib/__atexit.c +++ b/newlib/libc/stdlib/__atexit.c @@ -104,6 +104,8 @@ _DEFUN (__register_exitproc, #ifndef _REENT_SMALL p->_on_exit_args._fntypes = 0; p->_on_exit_args._is_cxa = 0; +#else + p->_on_exit_args_ptr = NULL; #endif #endif }