Commit ba8caceb authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

gdiplus: Free the correct pointer (Coverity).

parent 1e108423
...@@ -868,7 +868,7 @@ static GpStatus format_string_callback(HDC dc, ...@@ -868,7 +868,7 @@ static GpStatus format_string_callback(HDC dc,
for (i = index; i < length; ++i) for (i = index; i < length; ++i)
{ {
GLYPHMETRICS gm; GLYPHMETRICS gm;
TTPOLYGONHEADER *ph = NULL; TTPOLYGONHEADER *ph = NULL, *origph;
char *start; char *start;
DWORD len, ofs = 0; DWORD len, ofs = 0;
len = GetGlyphOutlineW(dc, string[i], GGO_BEZIER, &gm, 0, NULL, &identity); len = GetGlyphOutlineW(dc, string[i], GGO_BEZIER, &gm, 0, NULL, &identity);
...@@ -877,7 +877,7 @@ static GpStatus format_string_callback(HDC dc, ...@@ -877,7 +877,7 @@ static GpStatus format_string_callback(HDC dc,
status = GenericError; status = GenericError;
break; break;
} }
ph = GdipAlloc(len); origph = ph = GdipAlloc(len);
start = (char *)ph; start = (char *)ph;
if (!ph || !lengthen_path(path, len / sizeof(POINTFX))) if (!ph || !lengthen_path(path, len / sizeof(POINTFX)))
{ {
...@@ -931,7 +931,7 @@ static GpStatus format_string_callback(HDC dc, ...@@ -931,7 +931,7 @@ static GpStatus format_string_callback(HDC dc,
x += gm.gmCellIncX * args->scale; x += gm.gmCellIncX * args->scale;
y += gm.gmCellIncY * args->scale; y += gm.gmCellIncY * args->scale;
GdipFree(ph); GdipFree(origph);
if (status != Ok) if (status != Ok)
break; break;
} }
......
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