gdi32: Fix gdi font leak in CreateScalableFontResourceW.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50273
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2020-12-09 21:41:27 +01:00 committed by Alexandre Julliard
parent 6f55c8d1c5
commit 76c9dbd4fb
1 changed files with 1 additions and 0 deletions

View File

@ -6887,6 +6887,7 @@ BOOL WINAPI CreateScalableFontResourceW( DWORD hidden, LPCWSTR resource_file,
fontdir.dfReserved = 0;
WideCharToMultiByte( CP_ACP, 0, (WCHAR *)font->otm.otmpFamilyName, -1,
fontdir.szFaceName, LF_FACESIZE, NULL, NULL );
free_gdi_font( font );
if (hidden) fontdir.dfType |= 0x80;
return create_fot( resource_file, font_file, &fontdir );