зеркало из https://github.com/mozilla/pjs.git
Fix for leak of nsByteArrayInputStream objects and associated buffers from nsHTTPChunkConv. r=scc
This commit is contained in:
Родитель
167877c889
Коммит
f798e153d8
|
@ -181,17 +181,14 @@ nsHTTPChunkConv::OnDataAvailable (
|
||||||
{
|
{
|
||||||
if (mChunkBufferLength > 0)
|
if (mChunkBufferLength > 0)
|
||||||
{
|
{
|
||||||
nsIInputStream * convertedStream = nsnull;
|
nsCOMPtr<nsIByteArrayInputStream> convertedStreamSup;
|
||||||
nsIByteArrayInputStream * convertedStreamSup = nsnull;
|
rv = NS_NewByteArrayInputStream (getter_AddRefs(convertedStreamSup), mChunkBuffer, mChunkBufferLength);
|
||||||
|
|
||||||
rv = NS_NewByteArrayInputStream (&convertedStreamSup, mChunkBuffer, mChunkBufferLength);
|
|
||||||
if (NS_FAILED (rv))
|
if (NS_FAILED (rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
mChunkBuffer = NULL;
|
mChunkBuffer = NULL;
|
||||||
|
|
||||||
rv = convertedStreamSup -> QueryInterface (NS_GET_IID (nsIInputStream), (void**)&convertedStream);
|
nsCOMPtr<nsIInputStream> convertedStream = do_QueryInterface (convertedStreamSup, &rv);
|
||||||
NS_RELEASE (convertedStreamSup);
|
|
||||||
|
|
||||||
if (NS_FAILED (rv))
|
if (NS_FAILED (rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче