about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2015-08-08 16:27:58 -0700
committerPaul Pluzhnikov <ppluzhnikov@google.com>2015-08-08 16:27:58 -0700
commita601b74d31ca086de38441d316a3dee24c866305 (patch)
tree49f9faabd44a5658ac61cdabefcea2e497b5ae68
parent7565d2a862683a3c26ffb1f32351b8c5ab9f7b31 (diff)
downloadglibc-a601b74d31ca086de38441d316a3dee24c866305.tar.gz
glibc-a601b74d31ca086de38441d316a3dee24c866305.tar.xz
glibc-a601b74d31ca086de38441d316a3dee24c866305.zip
In preparation for fixing BZ#16734, fix failure in misc/tst-error1-mem
when _G_HAVE_MMAP is turned off.
-rw-r--r--ChangeLog5
-rw-r--r--libio/genops.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 64bbb2b626..0e7b31996d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2015-08-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
 
+	[BZ #16734]
+	* libio/genops.c (_IO_unbuffer_all): Free wide buffer as well.
+
+2015-08-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
+
 	[BZ #17905]
 	* catgets/Makefile (tst-catgets-mem): New test.
 	* catgets/catgets.c (catopen): Don't use unbounded alloca.
diff --git a/libio/genops.c b/libio/genops.c
index 0f5e80064e..e13b3d1390 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);