summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2015-08-27 13:58:14 +0200
committerJulian Andres Klode <jak@debian.org>2015-08-27 13:58:14 +0200
commitf19d6a77f60b876e5453614d24886aabdd242ef6 (patch)
tree4d9ed940810a874e5112f2d5b7d159bef2a0d9cc /apt-pkg
parent848fd2a65fa2aef296d44c9a19b89ac272ca12fe (diff)
parent3564c2f4cfd9cbca6114da15c27f73efd08df78c (diff)
Merge branch 'feature/extractar-filefd' into debian/experimental
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/contrib/fileutl.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index 1be782bac..d7c9424cf 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -2006,12 +2006,13 @@ bool FileFd::Close()
{
if ((Flags & Compressed) != Compressed && iFd > 0 && close(iFd) != 0)
Res &= _error->Errno("close",_("Problem closing the file %s"), FileName.c_str());
- if (d != NULL)
- {
- Res &= d->CloseDown(FileName);
- delete d;
- d = NULL;
- }
+ }
+
+ if (d != NULL)
+ {
+ Res &= d->CloseDown(FileName);
+ delete d;
+ d = NULL;
}
if ((Flags & Replace) == Replace) {