[cairo-commit] libpixman/src icimage.c,1.26,1.27

Carl Worth commit at pdx.freedesktop.org
Wed May 18 09:27:26 PDT 2005


Committed by: cworth

Update of /cvs/cairo/libpixman/src
In directory gabe:/tmp/cvs-serv9952/src

Modified Files:
	icimage.c 
Log Message:

        * src/icimage.c (pixman_image_destroy): Clear pointers to NULL
        after destroying/freeing them.


Index: icimage.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/icimage.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- icimage.c	28 Apr 2005 18:16:52 -0000	1.26
+++ icimage.c	18 May 2005 16:27:24 -0000	1.27
@@ -243,14 +243,20 @@
 void
 pixman_image_destroy (pixman_image_t *image)
 {
-    if (image->freeCompClip)
+    if (image->freeCompClip) {
 	pixman_region_destroy (image->pCompositeClip);
+	image->pCompositeClip = NULL;
+    }
 
-    if (image->owns_pixels)
+    if (image->owns_pixels) {
 	IcPixelsDestroy (image->pixels);
+	image->pixels = NULL;
+    }
 
-    if (image->transform)
+    if (image->transform) {
 	free (image->transform);
+	image->transform = NULL;
+    }
 
     free (image);
 }




More information about the cairo-commit mailing list