From fb9d8eeba83cd20d9b4ae22d4f828865965b3032 Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Wed, 13 Jul 2005 18:26:20 +0000 Subject: [PATCH] Bug 296448 scaled_image leaks if scaled_image->Init() fails patch by b.jacques@planet.nl r=roc sr=roc a=asa --- gfx/src/x11shared/nsXFontAAScaledBitmap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gfx/src/x11shared/nsXFontAAScaledBitmap.cpp b/gfx/src/x11shared/nsXFontAAScaledBitmap.cpp index 988f4fee836..929e76edd14 100644 --- a/gfx/src/x11shared/nsXFontAAScaledBitmap.cpp +++ b/gfx/src/x11shared/nsXFontAAScaledBitmap.cpp @@ -414,7 +414,8 @@ nsXFontAAScaledBitmap::GetScaledGreyImage(const char *aChar, return PR_FALSE; } if (!scaled_image->Init()) { - NS_ASSERTION(0, "failed to create scaled_image"); + NS_ASSERTION(0, "failed to initialize scaled_image"); + delete scaled_image; return PR_FALSE; } scaled_image->SetSize(&glyphMetrics);