mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-06-06 10:38:52 +02:00
[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).
This commit is contained in:
parent
ae19b1c991
commit
6525d4debb
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue