1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

gdiplus: Fix use after free in GdipAddPathString.

This commit is contained in:
Esme Povirk 2024-03-01 18:54:33 +00:00 committed by Alexandre Julliard
parent 02b68a0ac1
commit 3ca8204837

View file

@ -1141,7 +1141,6 @@ GpStatus WINGDIPAPI GdipAddPathString(GpPath* path, GDIPCONST WCHAR* string, INT
}
get_log_fontW(font, graphics, &lfw);
GdipDeleteGraphics(graphics);
hfont = CreateFontIndirectW(&lfw);
if (!hfont)
@ -1167,6 +1166,7 @@ GpStatus WINGDIPAPI GdipAddPathString(GpPath* path, GDIPCONST WCHAR* string, INT
DeleteDC(dc);
DeleteObject(hfont);
GdipDeleteFont(font);
GdipDeleteGraphics(graphics);
if (status != Ok) /* free backup */
{