From 26b37f959350860a0c1d5ef9651efa0bf3640cb5 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 12 Feb 2011 19:40:47 +0100 Subject: * apt-pkg/contrib/mmap.cc: - do not try to free the mapping if its is unset --- apt-pkg/contrib/mmap.cc | 2 ++ debian/changelog | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) 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 diff --git a/debian/changelog b/debian/changelog index 4f1a8afa4..f8d29abde 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,8 +9,10 @@ apt (0.8.12) unstable; urgency=low marker could be lost later by the removal of rdepends (Closes: #612557) * methods/rred.cc: - read patch into MMap only if we work on uncompressed patches + * apt-pkg/contrib/mmap.cc: + - do not try to free the mapping if its is unset - -- David Kalnischkies Sat, 12 Feb 2011 13:43:11 +0100 + -- David Kalnischkies Sat, 12 Feb 2011 19:39:25 +0100 apt (0.8.11.1) unstable; urgency=low -- cgit v1.2.3