Commit 3ca82048 authored by Esme Povirk's avatar Esme Povirk Committed by Alexandre Julliard

gdiplus: Fix use after free in GdipAddPathString.

parent 02b68a0a
......@@ -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 */
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment