stop leaking zlib buffers when using compressed streams

patch by pedemont@us.ibm.com
r=dougt, sr=alecf
should fix a pretty major leak!
This commit is contained in:
alecf%flett.org 2003-05-28 23:45:06 +00:00
Родитель db8cb8d68f
Коммит 51c3128e9e
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -76,6 +76,11 @@ nsHTTPCompressConv::~nsHTTPCompressConv()
if (mOutBuffer) if (mOutBuffer)
nsMemory::Free(mOutBuffer); nsMemory::Free(mOutBuffer);
// For some reason we are not getting Z_STREAM_END. But this was also seen
// for mozilla bug 198133. Need to handle this case.
if ((mStreamInitialized == PR_TRUE) && (mStreamEnded == PR_FALSE))
inflateEnd (&d_stream);
} }
NS_IMETHODIMP NS_IMETHODIMP