gdiplus: Fix error path in GdipAddPathRectangle.
This commit is contained in:
parent
cd3855f384
commit
4fd76b0995
@ -1536,9 +1536,10 @@ GpStatus WINGDIPAPI GdipAddPathRectangle(GpPath *path, REAL x, REAL y,
|
|||||||
|
|
||||||
fail:
|
fail:
|
||||||
/* reverting */
|
/* reverting */
|
||||||
GdipDeletePath(path);
|
GdipFree(path->pathdata.Points);
|
||||||
GdipClonePath(backup, &path);
|
GdipFree(path->pathdata.Types);
|
||||||
GdipDeletePath(backup);
|
memcpy(path, backup, sizeof(*path));
|
||||||
|
GdipFree(backup);
|
||||||
|
|
||||||
return retstat;
|
return retstat;
|
||||||
}
|
}
|
||||||
@ -1581,9 +1582,10 @@ GpStatus WINGDIPAPI GdipAddPathRectangles(GpPath *path, GDIPCONST GpRectF *rects
|
|||||||
|
|
||||||
fail:
|
fail:
|
||||||
/* reverting */
|
/* reverting */
|
||||||
GdipDeletePath(path);
|
GdipFree(path->pathdata.Points);
|
||||||
GdipClonePath(backup, &path);
|
GdipFree(path->pathdata.Types);
|
||||||
GdipDeletePath(backup);
|
memcpy(path, backup, sizeof(*path));
|
||||||
|
GdipFree(backup);
|
||||||
|
|
||||||
return retstat;
|
return retstat;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user