- Merge from trunk up to r45543
[reactos.git] / dll / win32 / gdiplus / region.c
index 197b68a..eab9b8f 100644 (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;
     }