Commit 55bf97bb authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

gdiplus: Fix a couple of memory leaks.

Found by Valgrind.
parent 497b67db
...@@ -249,6 +249,7 @@ GpStatus WINGDIPAPI GdipCombineRegionPath(GpRegion *region, GpPath *path, Combin ...@@ -249,6 +249,7 @@ GpStatus WINGDIPAPI GdipCombineRegionPath(GpRegion *region, GpPath *path, Combin
if(mode == CombineModeReplace){ if(mode == CombineModeReplace){
delete_element(&region->node); delete_element(&region->node);
memcpy(region, path_region, sizeof(GpRegion)); memcpy(region, path_region, sizeof(GpRegion));
GdipFree(path_region);
return Ok; return Ok;
} }
...@@ -295,6 +296,7 @@ GpStatus WINGDIPAPI GdipCombineRegionRect(GpRegion *region, ...@@ -295,6 +296,7 @@ GpStatus WINGDIPAPI GdipCombineRegionRect(GpRegion *region,
if(mode == CombineModeReplace){ if(mode == CombineModeReplace){
delete_element(&region->node); delete_element(&region->node);
memcpy(region, rect_region, sizeof(GpRegion)); memcpy(region, rect_region, sizeof(GpRegion));
GdipFree(rect_region);
return Ok; return Ok;
} }
......
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