gdiplus: Fix a couple of memory leaks.

Found by Valgrind.
This commit is contained in:
Huw Davies 2009-12-06 11:11:44 +00:00 committed by Alexandre Julliard
parent 497b67dbf6
commit 55bf97bba7

View file

@ -249,6 +249,7 @@ GpStatus WINGDIPAPI GdipCombineRegionPath(GpRegion *region, GpPath *path, Combin
if(mode == CombineModeReplace){
delete_element(&region->node);
memcpy(region, path_region, sizeof(GpRegion));
GdipFree(path_region);
return Ok;
}
@ -295,6 +296,7 @@ GpStatus WINGDIPAPI GdipCombineRegionRect(GpRegion *region,
if(mode == CombineModeReplace){
delete_element(&region->node);
memcpy(region, rect_region, sizeof(GpRegion));
GdipFree(rect_region);
return Ok;
}