diff options
author | Carl Worth <cworth@cworth.org> | 2006-05-04 14:24:18 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2006-05-04 14:24:18 -0700 |
commit | 450e29ce091e352569518bb5d6a9bf5236f14bfe (patch) | |
tree | 1e4c7ce2c7b6b8dee1a4e2d725ac0a6e6b81aeed | |
parent | ec94f0a7e2e82bee3973f4c64eb23bb60cac846c (diff) |
pixman: Remove potential memory leak in failure path.
Thanks to Petr Kobalicek <kobalicek.petr@gmail.com> for pointing this out.
-rw-r--r-- | pixman/src/ictri.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pixman/src/ictri.c b/pixman/src/ictri.c index 27deb3ca..a3947ab5 100644 --- a/pixman/src/ictri.c +++ b/pixman/src/ictri.c @@ -220,14 +220,15 @@ pixman_composite_tri_strip (pixman_operator_t op, 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_operator_t op, 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); |