Bug 395585 - OOM problems in nsPNGEncoder.cpp - r=bbondy

This commit is contained in:
Benoit Jacob 2011-10-13 08:09:22 -04:00
parent 1dfa6af486
commit fd347ebe2e

View File

@ -701,6 +701,7 @@ nsPNGEncoder::WriteCallback(png_structp png, png_bytep data,
if (! newBuf) {
// can't resize, just zero (this will keep us from writing more)
PR_Free(that->mImageBuffer);
that->mImageBuffer = nsnull;
that->mImageBufferSize = 0;
that->mImageBufferUsed = 0;
return;