Author: spouliot
Date: 2006-08-28 08:24:31 -0400 (Mon, 28 Aug 2006)
New Revision: 64472
Modified:
trunk/libgdiplus/src/ChangeLog
trunk/libgdiplus/src/texturebrush.c
Log:
2006-08-28 Sebastien Pouliot <[EMAIL PROTECTED]>
* texturebrush.c: Fix three cases (CID #249-251) where we didn't free
memory correctly when a error (like an out of memory) occured.
Modified: trunk/libgdiplus/src/ChangeLog
===================================================================
--- trunk/libgdiplus/src/ChangeLog 2006-08-28 12:20:11 UTC (rev 64471)
+++ trunk/libgdiplus/src/ChangeLog 2006-08-28 12:24:31 UTC (rev 64472)
@@ -1,6 +1,8 @@
-2006-08-28 Sebastien Pouliot <[EMAIL PROTECTED]>
+2006-08-28 Sebastien Pouliot <[EMAIL PROTECTED]>
* bitmap.c: Remove WORDS_BIGENDIAN block and use endian-correct macro.
+ * texturebrush.c: Fix three cases (CID #249-251) where we didn't free
+ memory correctly when a error (like an out of memory) occured.
2006-08-27 Sebastien Pouliot <[EMAIL PROTECTED]>
Modified: trunk/libgdiplus/src/texturebrush.c
===================================================================
--- trunk/libgdiplus/src/texturebrush.c 2006-08-28 12:20:11 UTC (rev 64471)
+++ trunk/libgdiplus/src/texturebrush.c 2006-08-28 12:24:31 UTC (rev 64472)
@@ -587,13 +587,15 @@
if (status != Ok) {
if (result->image)
GdipDisposeImage (result->image);
- return status;
+ GdipFree (result);
+ result = NULL;
+ } else {
+ cairo_surface_reference (result->image->surface);
}
- cairo_surface_reference (result->image->surface);
*clonedBrush = (GpBrush *) result;
- return Ok;
+ return status;
}
GpStatus
@@ -659,6 +661,8 @@
if (result->image)
GdipDisposeImage (result->image);
cairo_surface_destroy (imageSurface);
+ GdipFree (result);
+ *texture = NULL;
return status;
}
@@ -744,6 +748,8 @@
if (result->image)
GdipDisposeImage (result->image);
cairo_surface_destroy (new);
+ GdipFree (result);
+ *texture = NULL;
return status;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches