From: Michael Vogt Date: Thu, 25 Jul 2013 18:36:23 +0000 (+0200) Subject: call fdopen() after FileFd was checked X-Git-Tag: 0.9.10~23^2~13 X-Git-Url: https://git.hcoop.net/ntk/apt.git/commitdiff_plain/a80a03448fe11f8ea3fd4a8c525fc413c9ce9037 call fdopen() after FileFd was checked --- diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index 1d61b974..a2adb2d0 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -714,9 +714,9 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/ } 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");