summaryrefslogtreecommitdiff
path: root/apt-pkg/indexcopy.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-07-25 20:41:03 +0200
committerMichael Vogt <mvo@debian.org>2013-07-25 20:41:03 +0200
commit60fc4f21783fddaae481494f99ec157e08a9bfdb (patch)
tree2807e0a9c505a1191a3d5ade3b8ae2ede9ff9f9c /apt-pkg/indexcopy.cc
parenta80a03448fe11f8ea3fd4a8c525fc413c9ce9037 (diff)
apt-pkg/indexcopy.cc: check for pending errors before calling fdopen()
Diffstat (limited to 'apt-pkg/indexcopy.cc')
-rw-r--r--apt-pkg/indexcopy.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc
index a2adb2d00..4920efff8 100644
--- a/apt-pkg/indexcopy.cc
+++ b/apt-pkg/indexcopy.cc
@@ -106,9 +106,9 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List,
} else {
Target.Open(TargetF,FileFd::WriteAtomic);
}
- FILE *TargetFl = fdopen(dup(Target.Fd()),"w");
if (_error->PendingError() == true)
return false;
+ FILE *TargetFl = fdopen(dup(Target.Fd()),"w");
if (TargetFl == 0)
return _error->Errno("fdopen","Failed to reopen fd");