diff --git a/src/corelib/tools/qringbuffer.cpp b/src/corelib/tools/qringbuffer.cpp index c9ef3bc69a..d1a4ce79cb 100644 --- a/src/corelib/tools/qringbuffer.cpp +++ b/src/corelib/tools/qringbuffer.cpp @@ -120,7 +120,7 @@ void QRingBuffer::free(qint64 bytes) // keep a single block around if it does not exceed // the basic block size, to avoid repeated allocations // between uses of the buffer - if (bufferSize <= bytes) { + if (bufferSize == bytes) { if (chunk.capacity() <= basicBlockSize && !chunk.isShared()) { chunk.reset(); bufferSize = 0;