Mark Wielaard b9152c
commit 8c8306308e05e92de228de57e832c85fb976124b
Mark Wielaard b9152c
Author: florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9>
Mark Wielaard b9152c
Date:   Tue Jan 12 14:32:05 2016 +0000
Mark Wielaard b9152c
Mark Wielaard b9152c
    VG_(fclose) ought to close the file, you silly. Fixes BZ #357887.
Mark Wielaard b9152c
    
Mark Wielaard b9152c
    
Mark Wielaard b9152c
    git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15755 a5019735-40e9-0310-863c-91ae7b9d1cf9
Mark Wielaard b9152c
Mark Wielaard b9152c
diff --git a/coregrind/m_libcprint.c b/coregrind/m_libcprint.c
Mark Wielaard b9152c
index 1283de5..ce2c038 100644
Mark Wielaard b9152c
--- a/coregrind/m_libcprint.c
Mark Wielaard b9152c
+++ b/coregrind/m_libcprint.c
Mark Wielaard b9152c
@@ -359,6 +359,7 @@ void VG_(fclose)( VgFile *fp )
Mark Wielaard b9152c
    if (fp->num_chars)
Mark Wielaard b9152c
       VG_(write)(fp->fd, fp->buf, fp->num_chars);
Mark Wielaard b9152c
 
Mark Wielaard b9152c
+   VG_(close)(fp->fd);
Mark Wielaard b9152c
    VG_(free)(fp);
Mark Wielaard b9152c
 }
Mark Wielaard b9152c