Module: wine Branch: master Commit: ba8cacebf38580e9bd8f33bdd3ff08029f4705b5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ba8cacebf38580e9bd8f33bdd3...
Author: Marcus Meissner marcus@jet.franken.de Date: Wed Jan 1 19:25:59 2014 +0100
gdiplus: Free the correct pointer (Coverity).
---
dlls/gdiplus/graphicspath.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 8508b9b..882bc48 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -868,7 +868,7 @@ static GpStatus format_string_callback(HDC dc, for (i = index; i < length; ++i) { GLYPHMETRICS gm; - TTPOLYGONHEADER *ph = NULL; + TTPOLYGONHEADER *ph = NULL, *origph; char *start; DWORD len, ofs = 0; len = GetGlyphOutlineW(dc, string[i], GGO_BEZIER, &gm, 0, NULL, &identity); @@ -877,7 +877,7 @@ static GpStatus format_string_callback(HDC dc, status = GenericError; break; } - ph = GdipAlloc(len); + origph = ph = GdipAlloc(len); start = (char *)ph; if (!ph || !lengthen_path(path, len / sizeof(POINTFX))) { @@ -931,7 +931,7 @@ static GpStatus format_string_callback(HDC dc, x += gm.gmCellIncX * args->scale; y += gm.gmCellIncY * args->scale;
- GdipFree(ph); + GdipFree(origph); if (status != Ok) break; }