From 6525d4debb6df67126b04609bb04d23d9c9bd7a6 Mon Sep 17 00:00:00 2001 From: Vladimir Vukicevic Date: Tue, 28 Aug 2007 10:47:52 -0700 Subject: [PATCH] [win32] call free() and not scaled_font_destroy() if scaled init fails If scaled_font_destroy() is called, a deadlock can result; there's no reason to call destroy since the initialization failed (and, indeed, it might not be valid to do so anyway). --- src/cairo-win32-font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cairo-win32-font.c b/src/cairo-win32-font.c index 64df7e2fd..dfb475f7f 100644 --- a/src/cairo-win32-font.c +++ b/src/cairo-win32-font.c @@ -308,7 +308,7 @@ _win32_scaled_font_create (LOGFONTW *logfont, status = _cairo_win32_scaled_font_set_metrics (f); if (status) { - cairo_scaled_font_destroy (&f->base); + free (f); return NULL; }