Commit 4fd76b09 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Fix error path in GdipAddPathRectangle.

parent cd3855f3
......@@ -1536,9 +1536,10 @@ GpStatus WINGDIPAPI GdipAddPathRectangle(GpPath *path, REAL x, REAL y,
fail:
/* reverting */
GdipDeletePath(path);
GdipClonePath(backup, &path);
GdipDeletePath(backup);
GdipFree(path->pathdata.Points);
GdipFree(path->pathdata.Types);
memcpy(path, backup, sizeof(*path));
GdipFree(backup);
return retstat;
}
......@@ -1581,9 +1582,10 @@ GpStatus WINGDIPAPI GdipAddPathRectangles(GpPath *path, GDIPCONST GpRectF *rects
fail:
/* reverting */
GdipDeletePath(path);
GdipClonePath(backup, &path);
GdipDeletePath(backup);
GdipFree(path->pathdata.Points);
GdipFree(path->pathdata.Types);
memcpy(path, backup, sizeof(*path));
GdipFree(backup);
return retstat;
}
......
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