This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix failure to cleanup wide stream buffers in preparation for BZ#16734 fix


On Sun, Jul 12, 2015 at 12:22:03PM -0700, Paul Pluzhnikov wrote:
> 2015-07-12  Paul Pluzhnikov  <ppluzhnikov@google.com>
> 
>         [BZ #16734]
>         * libio/genops.c (_IO_unbuffer_all): Free wide buffer as well.

Looks good to me.

thanks,
Siddhesh

> diff --git a/libio/genops.c b/libio/genops.c
> index 0f5e800..e13b3d1 100644
> --- a/libio/genops.c
> +++ b/libio/genops.c
> @@ -977,6 +977,9 @@ _IO_unbuffer_all (void)
>  
>  	  _IO_SETBUF (fp, NULL, 0);
>  
> +	  if (fp->_mode > 0)
> +	    _IO_wsetb (fp, NULL, NULL, 0);
> +
>  #ifdef _IO_MTSAFE_IO
>  	  if (cnt < MAXTRIES && fp->_lock != NULL)
>  	    _IO_lock_unlock (*fp->_lock);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]