diff --git a/src/network/access/qhttp2protocolhandler.cpp b/src/network/access/qhttp2protocolhandler.cpp index ac90714132..c8b051731a 100644 --- a/src/network/access/qhttp2protocolhandler.cpp +++ b/src/network/access/qhttp2protocolhandler.cpp @@ -1209,6 +1209,9 @@ void QHttp2ProtocolHandler::updateStream(Stream &stream, const Frame &frame, QByteDataBuffer inDataBuffer; inDataBuffer.append(wrapped); replyPrivate->uncompressBodyData(&inDataBuffer, &replyPrivate->responseData); + // Now, make sure replyPrivate's destructor will properly clean up + // buffers allocated (if any) by zlib. + replyPrivate->autoDecompress = true; } else { replyPrivate->responseData.append(wrapped); }