summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/contrib/gpgv.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/apt-pkg/contrib/gpgv.cc b/apt-pkg/contrib/gpgv.cc
index 7d493fdf6..b6c4b6e08 100644
--- a/apt-pkg/contrib/gpgv.cc
+++ b/apt-pkg/contrib/gpgv.cc
@@ -381,6 +381,12 @@ bool SplitClearSignedFile(std::string const &InFile, FileFd * const ContentFile,
if (buf != NULL)
free(buf);
+ // Flush the files. Errors will be checked below.
+ if (SignatureFile != nullptr)
+ SignatureFile->Flush();
+ if (ContentFile != nullptr)
+ ContentFile->Flush();
+
// An error occured during reading - propagate it up
bool const hasErrored = _error->PendingError();
_error->MergeWithStack();