* libc/reent/reent.c (_reclaim_reent): Free also _misc and
_signal_buf.
This commit is contained in:
parent
99943e12c8
commit
837a83bf1c
|
@ -1,3 +1,8 @@
|
|||
2013-06-24 Terraneo Federico <fede.tft@hotmail.it>
|
||||
|
||||
* libc/reent/reent.c (_reclaim_reent): Free also _misc and
|
||||
_signal_buf.
|
||||
|
||||
2013-06-24 Terraneo Federico <fede.tft@hotmail.it>
|
||||
|
||||
* libc/include/sys/reent.h (_ATEXIT_INIT_PTR): Remove.
|
||||
|
|
|
@ -87,6 +87,10 @@ _DEFUN (_reclaim_reent, (ptr),
|
|||
_free_r (ptr, ptr->_localtime_buf);
|
||||
if (ptr->_asctime_buf)
|
||||
_free_r (ptr, ptr->_asctime_buf);
|
||||
if (ptr->_signal_buf)
|
||||
_free_r (ptr, ptr->_signal_buf);
|
||||
if (ptr->_misc)
|
||||
_free_r (ptr, ptr->_misc);
|
||||
#endif
|
||||
|
||||
#ifndef _REENT_GLOBAL_ATEXIT
|
||||
|
@ -110,6 +114,11 @@ _DEFUN (_reclaim_reent, (ptr),
|
|||
|
||||
if (ptr->_cvtbuf)
|
||||
_free_r (ptr, ptr->_cvtbuf);
|
||||
/* We should free _sig_func to avoid a memory leak, but how to
|
||||
do it safely considering that a signal may be delivered immediately
|
||||
after the free?
|
||||
if (ptr->_sig_func)
|
||||
_free_r (ptr, ptr->_sig_func);*/
|
||||
|
||||
if (ptr->__sdidinit)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue