From 88904a2c6e89432e758c8f663fe824474b352bdd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Thu, 29 May 2008 15:08:56 +0000 Subject: [PATCH] 23217: Use the correct length for unmap, msync git-svn-id: svn://svn.h5l.se/heimdal/branches/heimdal-release/heimdal-1-2-branch@23218 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/ftp/ftp/ftp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appl/ftp/ftp/ftp.c b/appl/ftp/ftp/ftp.c index 678355548..c5b29f7b8 100644 --- a/appl/ftp/ftp/ftp.c +++ b/appl/ftp/ftp/ftp.c @@ -610,7 +610,9 @@ copy_stream (FILE * from, FILE * to) } res = sec_write (fileno (to), chunk, len); - if (munmap (chunk, st.st_size) < 0) + if (msync (chunk, len, MS_ASYNC)) + warn ("msync"); + if (munmap (chunk, len) < 0) warn ("munmap"); sec_fflush (to); if (res != len) -- 2.11.4.GIT