This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix failure to cleanup wide stream buffers in preparation for BZ#16734 fix
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: Paul Pluzhnikov <ppluzhnikov at gmail dot com>
- Cc: GLIBC Devel <libc-alpha at sourceware dot org>, Paul Pluzhnikov <ppluzhnikov at google dot com>
- Date: Wed, 15 Jul 2015 16:48:59 +0530
- Subject: Re: Fix failure to cleanup wide stream buffers in preparation for BZ#16734 fix
- Authentication-results: sourceware.org; auth=none
- References: <CALoOobPZ9HcdiFqOyXW6+hetSeKMzUYCk1yPQk1_Y9-Ja_46HQ at mail dot gmail dot com>
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);