gdiplus: Fix error path in GdipAddPathRectangle.

This commit is contained in:
Vincent Povirk 2011-02-05 14:22:11 -06:00 committed by Alexandre Julliard
parent cd3855f384
commit 4fd76b0995
1 changed files with 8 additions and 6 deletions

View File

@ -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;
}