[cairo-ft-font] Destroy the unscaled reference on error.

Release the reference to the unscaled font if we encounter an error
whilst initialising the cairo_ft_scaled_font_t.
This commit is contained in:
Chris Wilson 2007-05-12 14:32:52 +01:00
parent e4055f02a1
commit abb19e61cf

View file

@ -1466,6 +1466,7 @@ _cairo_ft_scaled_font_create (cairo_ft_unscaled_font_t *unscaled,
&cairo_ft_scaled_font_backend);
if (status) {
free (scaled_font);
_cairo_unscaled_font_destroy (&unscaled->base);
_cairo_ft_unscaled_font_unlock_face (unscaled);
return NULL;
}