Plug leak of the gradient stops
authorSøren Sandmann Pedersen <sandmann@redhat.com>
Sat, 16 Jun 2007 05:40:07 +0000 (01:40 -0400)
committerSøren Sandmann Pedersen <sandmann@redhat.com>
Sat, 16 Jun 2007 05:40:07 +0000 (01:40 -0400)
pixman/pixman-image.c
pixman/pixman-private.h

index 5420416..2211677 100644 (file)
@@ -135,7 +135,13 @@ pixman_image_unref (pixman_image_t *image)
 #if 0
        memset (image, 0xaa, sizeof (pixman_image_t));
 #endif
+       if (image->type == LINEAR || image->type == RADIAL || image->type == CONICAL)
+       {
+           if (image->gradient.stops)
+               free (image->gradient.stops);
+       }
 
+       
        if (image->type == BITS && image->bits.free_me)
            free (image->bits.free_me);
        
index c0f25b9..db5597b 100644 (file)
@@ -248,6 +248,7 @@ union pixman_image
     image_type_t               type;
     image_common_t             common;
     bits_image_t               bits;
+    gradient_t                 gradient;
     linear_gradient_t          linear;
     conical_gradient_t         conical;
     radial_gradient_t          radial;