From a8e32416efd5178eaa243c20cfc8118f81de4814 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Wed, 11 Jun 2008 11:05:43 +1200 Subject: [PATCH] Make gfxImageSurface clear allocated surface data. r=vlad --- gfx/thebes/src/gfxImageSurface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/thebes/src/gfxImageSurface.cpp b/gfx/thebes/src/gfxImageSurface.cpp index 54f6909303b6..486cf5128228 100644 --- a/gfx/thebes/src/gfxImageSurface.cpp +++ b/gfx/thebes/src/gfxImageSurface.cpp @@ -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 {