From: Paul Pluzhnikov Date: Sat, 8 Aug 2015 23:27:58 +0000 (-0700) Subject: In preparation for fixing BZ#16734, fix failure in misc/tst-error1-mem X-Git-Tag: upstream/2.24~1271 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a601b74d31ca086de38441d316a3dee24c866305;p=platform%2Fupstream%2Fglibc.git In preparation for fixing BZ#16734, fix failure in misc/tst-error1-mem when _G_HAVE_MMAP is turned off. --- diff --git a/ChangeLog b/ChangeLog index 64bbb2b..0e7b319 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2015-08-08 Paul Pluzhnikov + [BZ #16734] + * libio/genops.c (_IO_unbuffer_all): Free wide buffer as well. + +2015-08-08 Paul Pluzhnikov + [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 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);