SOURCES: pixman-leak.patch (NEW) - from upstream

arekm arekm at pld-linux.org
Fri Jun 13 21:55:38 CEST 2008


Author: arekm                        Date: Fri Jun 13 19:55:38 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- from upstream

---- Files affected:
SOURCES:
   pixman-leak.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/pixman-leak.patch
diff -u /dev/null SOURCES/pixman-leak.patch:1.1
--- /dev/null	Fri Jun 13 21:55:38 2008
+++ SOURCES/pixman-leak.patch	Fri Jun 13 21:55:32 2008
@@ -0,0 +1,54 @@
+From: Maximilian Grothusmann <maxi at own-hero.net>
+Date: Fri, 13 Jun 2008 19:44:50 +0000 (-0700)
+Subject: Fix memory leak by freeing boxes{16,32}.
+X-Git-Url: http://gitweb.freedesktop.org/?p=pixman.git;a=commitdiff;h=29d144712e558aaeb49f4384028dd669d76a410b
+
+Fix memory leak by freeing boxes{16,32}.
+
+After calling pixman_region_init_rects() or
+pixman_region32_init_rects(), boxes{16,32} were not freed before
+returning. Fixes bug 16312.
+---
+
+--- a/pixman/pixman-region16.c
++++ b/pixman/pixman-region16.c
+@@ -47,6 +47,7 @@ pixman_region16_copy_from_region32 (pixm
+     int n_boxes, i;
+     pixman_box32_t *boxes32;
+     pixman_box16_t *boxes16;
++    pixman_bool_t retval;
+     
+     boxes32 = pixman_region32_rectangles (src, &n_boxes);
+ 
+@@ -64,7 +65,9 @@ pixman_region16_copy_from_region32 (pixm
+     }
+ 
+     pixman_region_fini (dst);
+-    return pixman_region_init_rects (dst, boxes16, n_boxes);
++    retval = pixman_region_init_rects (dst, boxes16, n_boxes);
++    free (boxes16);
++    return retval;
+ }
+ 
+ #include "pixman-region.c"
+--- a/pixman/pixman-region32.c
++++ b/pixman/pixman-region32.c
+@@ -45,6 +45,7 @@ pixman_region32_copy_from_region16 (pixm
+     int n_boxes, i;
+     pixman_box16_t *boxes16;
+     pixman_box32_t *boxes32;
++    pixman_bool_t retval;
+     
+     boxes16 = pixman_region_rectangles (src, &n_boxes);
+ 
+@@ -62,7 +63,9 @@ pixman_region32_copy_from_region16 (pixm
+     }
+ 
+     pixman_region32_fini (dst);
+-    return pixman_region32_init_rects (dst, boxes32, n_boxes);
++    retval = pixman_region32_init_rects (dst, boxes32, n_boxes);
++    free (boxes32);
++    return retval;
+ }
+ 
+ #include "pixman-region.c"
================================================================


More information about the pld-cvs-commit mailing list