summaryrefslogtreecommitdiff
path: root/ace/Mem_Map.i
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-03-17 18:32:04 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-03-17 18:32:04 +0000
commitd00fbf37ee62dc095c3d8d37d07cb0ddd8314c77 (patch)
treedbe490f400b11258321c4769832fb3d6ae9a2fed /ace/Mem_Map.i
parentd6d3f2b9b07768273454cbb32986da1ccd249030 (diff)
downloadATCD-d00fbf37ee62dc095c3d8d37d07cb0ddd8314c77.tar.gz
foo
Diffstat (limited to 'ace/Mem_Map.i')
-rw-r--r--ace/Mem_Map.i8
1 files changed, 6 insertions, 2 deletions
diff --git a/ace/Mem_Map.i b/ace/Mem_Map.i
index 62b3cd6daa6..f0941de8d1a 100644
--- a/ace/Mem_Map.i
+++ b/ace/Mem_Map.i
@@ -86,7 +86,9 @@ ACE_INLINE int
ACE_Mem_Map::unmap (int len)
{
ACE_TRACE ("ACE_Mem_Map::unmap");
- if (this->file_mapping_ != this->handle_)
+
+ if (this->file_mapping_ != this->handle_
+ && this->file_mapping_ != ACE_INVALID_HANDLE)
ACE_OS::close (this->file_mapping_);
this->file_mapping_ = ACE_INVALID_HANDLE;
@@ -100,7 +102,9 @@ ACE_INLINE int
ACE_Mem_Map::unmap (void *addr, int len)
{
ACE_TRACE ("ACE_Mem_Map::unmap");
- if (this->file_mapping_ != this->handle_)
+
+ if (this->file_mapping_ != this->handle_
+ && this->file_mapping_ != ACE_INVALID_HANDLE)
ACE_OS::close (this->file_mapping_);
this->file_mapping_ = ACE_INVALID_HANDLE;