diff options
author | Michael Vogt <mvo@debian.org> | 2011-02-14 21:42:04 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2011-02-14 21:42:04 +0100 |
commit | 42f45a9a98ee298cfdd301d16a39b0094f6ff9d5 (patch) | |
tree | d66c24f537044f755fdd6f4a4af862f9bd6029d6 /apt-pkg/contrib/mmap.cc | |
parent | 94244f75f8280c9b4018736d503d17455c284b2d (diff) | |
parent | 2a79d5b560398427f5538865099b6777128d8bed (diff) |
merged from lp:~donkult/apt/sid
Diffstat (limited to 'apt-pkg/contrib/mmap.cc')
-rw-r--r-- | apt-pkg/contrib/mmap.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc index 4978446d2..9945b1606 100644 --- a/apt-pkg/contrib/mmap.cc +++ b/apt-pkg/contrib/mmap.cc @@ -106,7 +106,7 @@ bool MMap::Map(FileFd &Fd) /* */ bool MMap::Close(bool DoSync) { - if ((Flags & UnMapped) == UnMapped || Base == 0 || iSize == 0) + if ((Flags & UnMapped) == UnMapped || validData() == false || iSize == 0) return true; if (DoSync == true) @@ -266,7 +266,7 @@ DynamicMMap::~DynamicMMap() { if (Fd == 0) { - if (Base == 0) + if (validData() == false) return; #ifdef _POSIX_MAPPED_FILES munmap(Base, WorkSpace); |