summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/mmap.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2003-09-26 08:50:12 +0000
committerCorinna Vinschen <corinna@vinschen.de>2003-09-26 08:50:12 +0000
commit186a0e42de9b19d267e2b5bb1f1ff108e2d9ae36 (patch)
treecf1be90bf6d6dd9193473ba71a4a9b20f4e490ae /winsup/cygwin/mmap.cc
parent0a0a45e22a1f97ac834f757b09fef4b985cee99d (diff)
downloadcygnal-186a0e42de9b19d267e2b5bb1f1ff108e2d9ae36.tar.gz
cygnal-186a0e42de9b19d267e2b5bb1f1ff108e2d9ae36.tar.bz2
cygnal-186a0e42de9b19d267e2b5bb1f1ff108e2d9ae36.zip
* mmap.cc (munmap): Use correct address and length parameters when
calling fhandler's munmap.
Diffstat (limited to 'winsup/cygwin/mmap.cc')
-rw-r--r--winsup/cygwin/mmap.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
index 5ed774273..79014310e 100644
--- a/winsup/cygwin/mmap.cc
+++ b/winsup/cygwin/mmap.cc
@@ -679,12 +679,15 @@ munmap (void *addr, size_t len)
mmap_record *rec = map_list->get_record (record_idx);
if (rec->unmap_pages (u_addr, u_len))
{
- /* The whole record has been unmapped, so... */
+ /* The whole record has been unmapped, so we now actually
+ unmap it from the system in full length... */
fhandler_base *fh = rec->alloc_fh ();
- fh->munmap (rec->get_handle (), (caddr_t)addr, len);
+ fh->munmap (rec->get_handle (),
+ rec->get_address (),
+ rec->get_size ());
rec->free_fh (fh);
- /* ...delete the record. */
+ /* ...and delete the record. */
if (map_list->del_record (record_idx--))
{
/* Yay, the last record has been removed from the list,