summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-02-12 19:40:47 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-02-12 19:40:47 +0100
commit26b37f959350860a0c1d5ef9651efa0bf3640cb5 (patch)
treeef283ae7d3eefc61529bb0b0c894902ec174a497 /apt-pkg
parent37254316e0b1c3b0c067cf1962d0882d70a38c12 (diff)
downloadapt-26b37f959350860a0c1d5ef9651efa0bf3640cb5.tar.gz
* apt-pkg/contrib/mmap.cc:
- do not try to free the mapping if its is unset
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/contrib/mmap.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc
index 69fb61fca..4978446d2 100644
--- a/apt-pkg/contrib/mmap.cc
+++ b/apt-pkg/contrib/mmap.cc
@@ -266,6 +266,8 @@ DynamicMMap::~DynamicMMap()
{
if (Fd == 0)
{
+ if (Base == 0)
+ return;
#ifdef _POSIX_MAPPED_FILES
munmap(Base, WorkSpace);
#else