summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmdline/apt-helper.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmdline/apt-helper.cc b/cmdline/apt-helper.cc
index e8b16c4e5..a519f3042 100644
--- a/cmdline/apt-helper.cc
+++ b/cmdline/apt-helper.cc
@@ -114,7 +114,8 @@ static bool DoCatFile(CommandLine &CmdL) /*{{{*/
char buf[4096];
unsigned long long read;
- out.OpenDescriptor(STDOUT_FILENO, FileFd::WriteOnly);
+ if (out.OpenDescriptor(STDOUT_FILENO, FileFd::WriteOnly) == false)
+ return false;
if (CmdL.FileSize() <= 1)
return _error->Error("Must specify at least one file name");