Make gfxImageSurface clear allocated surface data. r=vlad

This commit is contained in:
Robert O'Callahan 2008-06-11 11:05:43 +12:00
parent d7840a8c41
commit a8e32416ef

View File

@ -51,7 +51,7 @@ gfxImageSurface::gfxImageSurface(const gfxIntSize& size, gfxImageFormat format)
// if we have a zero-sized surface, just set mData to nsnull
if (mSize.height * mStride > 0) {
mData = (unsigned char *) malloc(mSize.height * mStride);
mData = (unsigned char *) calloc(mSize.height, mStride);
if (!mData)
return;
} else {