diff --git a/src/lib/expat/ExpatParser.hxx b/src/lib/expat/ExpatParser.hxx index 6617fec64..4dfe9489e 100644 --- a/src/lib/expat/ExpatParser.hxx +++ b/src/lib/expat/ExpatParser.hxx @@ -74,6 +74,10 @@ public: void Parse(const char *data, size_t length, bool is_final); + void CompleteParse() { + Parse("", 0, true); + } + void Parse(InputStream &is); gcc_pure @@ -109,6 +113,10 @@ public: parser.Parse(std::forward(args)...); } + void CompleteParse() { + parser.CompleteParse(); + } + gcc_pure static const char *GetAttribute(const XML_Char **atts, const char *name) noexcept { diff --git a/src/lib/expat/StreamExpatParser.cxx b/src/lib/expat/StreamExpatParser.cxx index 2119b6969..507a2b843 100644 --- a/src/lib/expat/StreamExpatParser.cxx +++ b/src/lib/expat/StreamExpatParser.cxx @@ -35,5 +35,5 @@ ExpatParser::Parse(InputStream &is) Parse(buffer, nbytes, false); } - Parse("", 0, true); + CompleteParse(); } diff --git a/src/storage/plugins/CurlStorage.cxx b/src/storage/plugins/CurlStorage.cxx index aedbafd11..49d07a74e 100644 --- a/src/storage/plugins/CurlStorage.cxx +++ b/src/storage/plugins/CurlStorage.cxx @@ -304,7 +304,7 @@ private: } void OnEnd() final { - Parse("", 0, true); + CompleteParse(); LockSetDone(); }