Author: spouliot
Date: 2007-09-28 09:35:39 -0400 (Fri, 28 Sep 2007)
New Revision: 86573

Modified:
   trunk/moon/src/ChangeLog
   trunk/moon/src/xaml.cpp
Log:
xaml.cpp: Free locally allocated Points inside get_point_array.

Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2007-09-28 13:23:07 UTC (rev 86572)
+++ trunk/moon/src/ChangeLog    2007-09-28 13:35:39 UTC (rev 86573)
@@ -1,3 +1,7 @@
+2007-09-28  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * xaml.cpp: Free locally allocated Points inside get_point_array.
+
 2007-09-28  Jeffrey Stedfast  <[EMAIL PROTECTED]>
 
        * font.cpp (GetGlyphInfo): Don't cache the bitmap if we're caching

Modified: trunk/moon/src/xaml.cpp
===================================================================
--- trunk/moon/src/xaml.cpp     2007-09-28 13:23:07 UTC (rev 86572)
+++ trunk/moon/src/xaml.cpp     2007-09-28 13:35:39 UTC (rev 86573)
@@ -1447,11 +1447,14 @@
                t = (Point *) pl->data;
                pts [i].x = t->x;
                pts [i].y = t->y;
-               
+
+               // locally allocated points needs to be deleted
+               if (i >= *count)
+                       delete t;
                pl = pl->next;
        }
 
-       last = t;
+       last = &pts [c - 1];
        *count = c;
 
        return pts;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to