Bug 1296258 - prevent memory leak in ScaledFontBase::GetGlyphDesignMetrics. r?jrmuizel
MozReview-Commit-ID: J3iaMWeVAQ7
--- a/gfx/2d/ScaledFontBase.cpp
+++ b/gfx/2d/ScaledFontBase.cpp
@@ -230,16 +230,17 @@ ScaledFontBase::GetGlyphDesignMetrics(co
else if (cairo_scaled_font_get_type(mScaledFont) == CAIRO_FONT_TYPE_DWRITE) {
if (aGlyphMetrics[i].mWidth > 0 && aGlyphMetrics[i].mHeight > 0) {
aGlyphMetrics[i].mWidth -= 2.0f;
aGlyphMetrics[i].mXBearing += 1.0f;
}
}
#endif
}
+ cairo_font_options_destroy(options);
}
}
#endif
// Don't know how to get the glyph metrics...
MOZ_CRASH("The specific backend type is not supported for GetGlyphDesignMetrics.");
}