In preparation for fixing BZ#16734, fix failure in misc/tst-error1-mem
authorPaul Pluzhnikov <ppluzhnikov@google.com>
Sat, 8 Aug 2015 23:27:58 +0000 (16:27 -0700)
committerPaul Pluzhnikov <ppluzhnikov@google.com>
Sat, 8 Aug 2015 23:27:58 +0000 (16:27 -0700)
when _G_HAVE_MMAP is turned off.

ChangeLog
libio/genops.c

index 64bbb2b..0e7b319 100644 (file)
--- 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.
index 0f5e800..e13b3d1 100644 (file)
@@ -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);