[cairo-commit] pixman/src

Carl Worth cworth at kemper.freedesktop.org
Thu May 4 14:27:59 PDT 2006


 pixman/src/ictri.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

New commits:
diff-tree 450e29ce091e352569518bb5d6a9bf5236f14bfe (from ec94f0a7e2e82bee3973f4c64eb23bb60cac846c)
Author: Carl Worth <cworth at cworth.org>
Date:   Thu May 4 14:24:18 2006 -0700

    pixman: Remove potential memory leak in failure path.
    
    Thanks to Petr Kobalicek <kobalicek.petr at gmail.com> for pointing this out.

diff --git a/pixman/src/ictri.c b/pixman/src/ictri.c
index 27deb3c..a3947ab 100644
--- a/pixman/src/ictri.c
+++ b/pixman/src/ictri.c
@@ -220,14 +220,15 @@ pixman_composite_tri_strip (pixman_opera
     int		xDst, yDst;
     int		xRel, yRel;
     pixman_format_t	*format;
+
+    if (npoints < 3)
+	return;
     
     xDst = points[0].x >> 16;
     yDst = points[0].y >> 16;
 
     format = pixman_format_create (PIXMAN_FORMAT_NAME_A8);
     
-    if (npoints < 3)
-	return;
     if (format)
     {
 	pixman_point_fixed_bounds (npoints, points, &bounds);
@@ -298,13 +299,14 @@ pixman_composite_tri_fan (pixman_operato
     int		xRel, yRel;
     pixman_format_t	*format;
     
+    if (npoints < 3)
+	return;
+
     xDst = points[0].x >> 16;
     yDst = points[0].y >> 16;
 
     format = pixman_format_create (PIXMAN_FORMAT_NAME_A8);
     
-    if (npoints < 3)
-	return;
     if (format)
     {
 	pixman_point_fixed_bounds (npoints, points, &bounds);


More information about the cairo-commit mailing list